in reply to loop through values in a string and print " " around each value.
and I could NEVER figure out how to use map
The usual use of map is
my @new = map { EXPR } @old;
It's equivalent to
my @new; foreach (@old) { push @new, EXPR; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: loop through values in a string and print " " around each value.
by kevyt (Scribe) on Jan 12, 2007 at 02:33 UTC |