"Jeff Westman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > In my limited experience with perl, I've never had to use the 'amp' command, > even though I see it used all the time. It seems to just be a short-cut of > other commands/keywords that I've used. > > So, when do you HAVE to use 'map', when no other option makes sense?! > >
Its a shortcut, so you never _have_ to use it. There was a post not too long ago and I used map() in one of the examples. Reverse an array without using reverse(): with an array slice and map(): [EMAIL PROTECTED] trwww]$ perl @array = ( 1 .. 5 ); @array = @array[ map abs(), -$#array .. 0 ]; print( join("\n", @array), "\n" ); Ctrl-D 5 4 3 2 1 see http://groups.google.com/groups?threadm=20030827112457.74911.qmail%40onion.perl.org Todd W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]