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

Re: elsif statement not being evaluated

by Anonymous Monk
on Nov 18, 2012 at 06:22 UTC ( #1004378=note: print w/ replies, xml ) Need Help??


in reply to elsif statement not being evaluated

This is a frequent pitfall

my $one = 1; print "one $one\n"; if ( $one = 2){ print "one $one\n"; $one = 22; } else { $one = 3; } print "one $one\n"; __END__ one 1 one 2 one 22

Common Perl Pitfalls / perltrap

Tutorials: Basic debugging checklist , brian's Guide to Solving Any Perl Problem

perlintro, http://learn.perl.org/books/beginning-perl/, http://perl-tutorial.org/, Tutorials: Basic debugging checklist , brian's Guide to Solving Any Perl Problem, Modern Perl book, a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.

The Perl Monks Guide to the Monastery


Comment on Re: elsif statement not being evaluated
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-08-29 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls