how to process each character in a string? - Perl Views : 254
Tagged in : Perl
0 0
Send mail
If you want to put each character from your string into an array (and presumably work on them some more), you'd take an approach like this:

# our string
$string = 'Four score and seven years ago our fathers';

# split the string into an array of characters
@array = split(//, $string);

# print the contents of our perl array
print "@array";
By Nithya, On - 2010-02-04



    Login to add Comments .