in reply to How to split a string
The answer to this question is almost always yes and there is almost always more than one way to do it. "There is more than one way to do it" is one of Perl's mottos. In this case, I will provide a straight forward answer.
my $str = '1029576843'; my @f = split //, $str; print $f[ 4 ]; # 5
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to split a string
by Ardemus (Beadle) on Jan 28, 2005 at 18:22 UTC |