Hi ,
 
using split ,I would like to split on space character. Dont want to use 
character classes.
my $string="108 ambulance 100\nfireengine141jack";
 
my @array = split /' '/,$string;  
 
foreach my $value (@array){
print "$value \n";
}
 
Result : its splitting on new line character.instead of space character.
 
Can some one clarify ?
 
for the same if the string is enclosed in single quotes ,splitting is not 
happening on the given string.
 
  
Regards,
chandan.

Reply via email to