Hi all,
 
Iam beginner to perl & i have a small query on split.
using split i want print everything even the character used to split on string.
 
Here is my example :
 
my $string = "hi123now456itstimeforsplit789right"
my @array  = split ( '/(\d+\s)/ ',$string); 
## Trying to split using digitnumber followed by space
 
print "@array \n";
 
please explain if anything wrong with my syntax.
 
My assumption is in the given string as there is no space followed by digits 
the output of array should be empty.
 
When I run the program ,it prints the whole string. so my assumption is wrong.
 
please Could some one explain me on this?
 
 
Best Regards,
chandan.
 
 

Reply via email to