in reply to Re: Origin of 'md5sum' and 'sh' logs
in thread Origin of 'md5sum' and 'sh' logs
In general a "my" variable cannot be declared within a conditional statement.Of course it can. Why should this be a problem?
You can declare a "my" variable in any lexical scope - the branches of an if-statement are just one example:
use strict; my $whatever; if($whatever) { my $something = "here"; } else { my $something = "there"; } print "look I compiled\n";
In Section
Seekers of Perl Wisdom