Wow, I don't think I would've figured this out on my own for a long while.
(Probably why my head is getting a little flat on one side...)
Using print map { } list; works pretty well. I need to sit down with
it for a while to understand it it better.
Thanks for the nice explanation, Kipp.
deb
Paul <[EMAIL PROTECTED]> had this to say,
>
> --- 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
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
There are 010 types of people in the world:
those that understand binary, and those that don't.
���
~
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]