You may want something like this?
use strict; use warnings; my $string = "Hello World"; while($string =~/./g){ print "$&\n"; }
Or,
use strict; use warnings; my $string = "Hello World"; my @string = split(//,$string); for my $str (@string){ print "$str\n"; }
Punitha
In reply to Re: How to get each character in string value
by Punitha
in thread How to get each character in string value
by dharanivasan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |