But the "usual" way is
for my $c (split //, $string) { print $c; }
Alternatively:
while ( $string =~ m/(.)/g ){ print $1; }
In reply to Re: iterating through scalar
by LanX
in thread iterating through scalar
by yedukondalu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |