Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: if defined not working

by mr_mischief (Monsignor)
on Feb 04, 2016 at 17:38 UTC ( #1154411=note: print w/replies, xml ) Need Help??


in reply to Re^2: if defined not working
in thread if defined not working

my $one = 1; my $zero = 0; my $undef; my $result; $result = 1; # 1 $result = 1 || 0; # also 1 $result = 0 || 1; # also 1 $result = $zero || $one; # also 1 $result = $zero // $one; # 0 $result = $zero // 1; # 0 as well $result = 0 // 1; # 0 as well $result = $undef // $one; # 1 again $result = $undef || $one; # 1 again $result = fork || die; # dies in the child process or if failing to + fork $result = fork && die; # dies in the parent process $result = fork // die; # dies in process unable to fork a child # (beware the return values of function calls, for they are subtle and + quick to bite your behind)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-12-03 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?