<?xml version="1.0" encoding="windows-1252"?>
<node id="1004378" title="Re: elsif statement not being evaluated" created="2012-11-18 01:22:16" updated="2012-11-18 01:22:16">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
&lt;p&gt; This is a frequent pitfall
&lt;c&gt;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
&lt;/c&gt;
&lt;p&gt; [id://964216|Common Perl Pitfalls] / [doc://perltrap] &lt;p&gt; [Tutorials]: [id://745674|Basic debugging checklist] , [id://376075|brian's Guide to Solving Any Perl Problem] &lt;p&gt; [doc://perlintro], [href://http://learn.perl.org/books/beginning-perl/], [href://http://perl-tutorial.org/], [Tutorials]: [id://745674|Basic debugging checklist] , [id://376075|brian's Guide to Solving Any Perl Problem], [id://887711|Modern Perl] book, &lt;i&gt;a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.&lt;/i&gt;&lt;p&gt; [id://972|The Perl Monks Guide to the Monastery]</field>
<field name="root_node">
1004376</field>
<field name="parent_node">
1004376</field>
<field name="reputation">
14</field>
</data>
</node>
