So, Perl returns last evaluated value. My question is: are there any conditions when Perl would NOT print "some string" in last two lines of code? Thanks!use strict; my $R; sub mySub { unless ($R) { print "CONDITION WORKS\n"; $R = 'some string'; } } print mySub(); #prints CONDITION WORKS\nsome string print mySub(); #prints some string print mySub(); #again
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |