Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Why? uninitialized value in pattern match when using if (defined)

by SamCG (Hermit)
on Mar 22, 2006 at 00:08 UTC ( [id://538354]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;## good line to have.  use strict; is also prudent
    $x=undef;    ## I explicitly set it to undef here]
    ...
    
    ($s)=$x=~m/regex/; ## $x is undefined, and produces warning
    print $s;          ## presumably, I wanted $s for something
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-15 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found