Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Can you guess the result? Is it a bug?

by edoc (Chaplain)
on Jul 31, 2003 at 03:28 UTC ( [id://279465]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ]$ perl -wMstrict -e"if( my($test) = 0 ) { print 'Passed'; } else { pr
    +int 'Failed'; }"
    Can't declare stub in "my" at -e line 1, near ") ="
    ...
    ]$ perl -wMstrict -e "if( my $test = undef ) { print 'Passed'; } else 
    +{ print 'Failed'; }"
    syntax error at -e line 1, near "my  ="
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    ]$ perl -wMstrict -e 'if( my ($test) = undef ) { print "Passed"; } els
    +e { print "Failed"; }'
    Passed
    
    ]$ perl -wMstrict -e 'if( my $test = undef ) { print "Passed"; } else 
    +{ print "Failed"; }'
    Failed
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found