Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: perl's grep function with '^' and '$'

by moritz (Cardinal)
on May 25, 2007 at 09:16 UTC ( #617441=note: print w/replies, xml ) Need Help??


in reply to perl's grep function with '^' and '$'

The problem is in the quoting. qq[...] quotes a string, so your array has just one element - that happens to start with an A.

use qw(Anthony Mark Alex A) and all is fine.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://617441]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2021-12-02 12:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (19 votes). Check out past polls.

    Notices?