http://qs1969.pair.com?node_id=791952


in reply to Save Split to Array

spickles
A simpler way to do the for loop is to use the foreach.
my $str = "I'm not as think as you stoned I am"; # split into individual words on whitespace delimiter # and store in array @words my @words = split( /\s+/, $str ); foreach my $word (@words) { print "$word\n"; }
-- Grey Fox
"We are grey. We stand between the darkness and the light" B5