On Wednesday 28 Jul 2010 20:12:15 Chandan Kumar wrote:
> 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; 
>  

You need «my @array = split / /, $string;» instead. «split ' ', $string;» is 
more magical.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to