You have code in replies above but for future reference:
- We like to see your code (working code, that is, where code which compiles but produces errors or warnings upon execution minimally satisfies the "working" condition)... as a alternative to mere referals to the documents, in this case:
- perldoc -f grep
$anecdote ne $data
Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
- code
- verbatim error and/or warning messages
- a coherent explanation of what "doesn't work actually means.