[Buffalo-pm] Splitting String Of Length "N" Into Elements Of An Array...
DANIEL MAGNUSZEWSKI
dmagnuszewski at mandtbank.com
Thu Dec 29 08:13:40 PST 2005
All,
I need to take a string of length n, where n is very large and unknown,
and put each letter into an element of an array.
Sudo-Code Example:
$string = 'slkdfj';
@letters = split /SOME REGEX/, $string;
foreach (@letters) { print "Element: $_\n"; }
Expected Output:
Element: s
Element: l
Element: k
Element: d
Element: f
Element: j
I'm not sure if using split is the proper way to accomplish this, or if
I need to use some kind of stream reader.
Thoughts?
#!/Dan
More information about the Buffalo-pm
mailing list