Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: if defined not working

by choroba (Cardinal)
on Feb 04, 2016 at 15:45 UTC ( [id://1154403]=note: print w/replies, xml ) Need Help??


in reply to if defined not working

Hi liorlew, welcome to the Monastery!

Under strict, or more precisely, strict 'vars' , you have to declare each variable before you use it. You haven't declared $undefvar .

use strict; use warnings; my $newvar = 0; my $undefvar; # Declared, but undefined. if (defined $undefvar) { $newvar = $undefvar; }

Update: refsvars

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-23 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found