Don't ask to ask, just ask | |
PerlMonks |
Re: How to split a stringby kutsu (Priest) |
on Jan 28, 2005 at 15:51 UTC ( [id://426005]=note: print w/replies, xml ) | Need Help?? |
Since several people have given the @f = split... answer: why do you want to split a string into each individual character anyway? I ask because there may be an easier way to do this. If, for example, you only want the 4 character, my $f = substr($s, 4, 1) would work (and is proably easier then $fourthchar = $f[4];, after the split, if that's all you want). "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
In Section
Seekers of Perl Wisdom
|
|