Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: elsif statement not being evaluated

by Anonymous Monk
on Nov 18, 2012 at 06:22 UTC ( [id://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

Log In?
Username:
Password:

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

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

    No recent polls found