in reply to Re: Re: Ahh the map function
in thread Ahh the map function

OK, Let's say @edittypes = ( 'foo', 'bar', 'zoot' ). For each of these, map sets $_ to the array element, and spits out the return value of the block. So, map returns ( '\.foo', '\.bar', '\.zoot' ). These are joined with pipes; after executing the first line, you have $regex = '\.foo|\.bar|\.zoot'.

Now, since you don't appear to be matching to anything in the second line, I am guessing this came from inside a loop with an implicit value. Whatever $_ is equal to when the second line runs is matched against $regex, case insensitive. If there's no match, call the inerror function, whatever that may be.

Does that clear it up?

Update: Corrected escaping of backslash.


_______________
D a m n D i r t y A p e
Home Node | Email

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.