--- Deb <[EMAIL PROTECTED]> wrote:
> Hmmm, that's a useful work-around.
> I may use it, but I'm really interested in finding out what the
> correct invocaton of "map EXPR, LIST" would be.
> Anyone know?
> Thanks,
> deb
The problem in the stuff after the comma after the parens after a
print, lol.... -w always carps about that. This calls print seperately
for each thing anyway, though -- don't use map as a loop construct. You
said
> > map print ("\t\"$_\"\n"), @{$HashofLists{$List} };
Rather than that, either use foreach as in
print "\t\"$_\"\n" foreach @{$HashofLists{$List} };
or (better, in my mind) just call print once, and use map to construct
the argument list, like this:
print map { "\t\"$_\"\n" } @{$HashofLists{$List} };
That's pretty efficient; print() gets one set of data to print, and map
does what it's for -- mapping data to corresponding but different
values. =o) One last change for readability:
print map { qq(\t"$_"\n) } @{$HashofLists{$List} };
Personal preference, feel free to ignore it, lol...
Paul
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]