Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: grep {CONSTANT} @list

by LanX (Chancellor)
on Nov 21, 2012 at 20:42 UTC ( #1005003=note: print w/replies, xml ) Need Help??

in reply to grep {CONSTANT} @list

you are confusing a regex data-type with a regex operation.

grep {REGEXP} uses a code-block which returns a regex which is always true if defined.

grep {/string/} uses a m// (match operation) which defaults to test $_.

Cheers Rolf

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005003]
Ratazong takes a cookie from the platter on the sideboard.
Ratazong adds shortbread cookies to the platter on the sideboard.
[Lady_Aleena]: Hi Ratazong.
[Ratazong]: Hi Lady Aleena
Ratazong just learned about free cookies ;-)
shmem rolls a barrel of beer into the refectorium at the request of jedikaiti

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2017-04-26 09:59 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (471 votes). Check out past polls.