PerlElvir
Technical User
- Aug 23, 2005
- 68
Hi all , I want to split something by capital latter and I have this situation:
$var="Sam 134 Dan 234 Hal 345";
@tax1 = split(/[A-Z]/, $var);
now in array I have
@tax1=("am 134","an 234","al 345")
my question is how can I split by capital latter, but also to have that capital letter, so I need to have like this:
@tax1=("Sam 134","Dan 234","Hal 345")
$var="Sam 134 Dan 234 Hal 345";
@tax1 = split(/[A-Z]/, $var);
now in array I have
@tax1=("am 134","an 234","al 345")
my question is how can I split by capital latter, but also to have that capital letter, so I need to have like this:
@tax1=("Sam 134","Dan 234","Hal 345")