On Mon, 17 Jan 2005 17:19:26 GMT, "George" <>
wrote:
>I needed to run regular exression(RE) for all the elements of an array
Yes...
>so I thought of using MAP(one liner) insted foreach.
Not such a thing as MAP...
>Following line
>@Rfolder=map {/#(.*?)(?=
/,$_} @getlistF;
....as your correct use of map() shows.
>gave me all the existing elements plus what is extracted by RE
is this what you want? Is this _not_ what you want? What do you want?
>but
>following line
>@Rfolder=map {/#(.*?)(?=
/} @getlistF;
>gave me just what RE returned,
Yes...
>Definetly it means that I do not understand MAP correctly,
Perhaps... are you missing a list context here?
Definitely you do _not_ understand that there's not such a thing as
MAP. And I can't really understand why you spell it so.
>can somebody please explain what is the difference between two
>statement , cause what I understood that $_ needs to be set before ,
>for RE to work.
What does make you suppose it's not set?
However I can't explain you the difference, but hopefully
perldoc -f map
can.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,