Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: no grep match returns undefined?

by thelenm (Vicar)
on Sep 05, 2002 at 16:16 UTC ( [id://195426]=note: print w/replies, xml ) Need Help??


in reply to no grep match returns undefined?

In list context, grep will return an empty list if no matching elements were found. What you're doing is trying to access the 0th first element of an empty list, which results in undef.

-- Mike

--
just,my${.02}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-18 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found