2008/4/29 H.Merijn Brand <h.m.brand@xs4all.nl>: > related nuisance: > > /home/merijn 102 > cat xx.pl > #!/pro/bin/perl > > use strict; > use warnings; > > if (my @scr = glob ("*.sh")) { > print "I have shell scripts here\n"; > } > elsif (my @scr = glob ("*.pl")) { > print "I have perl scripts here\n"; > } > /home/merijn 103 > perl xx.pl > "my" variable @scr masks earlier declaration in same scope at xx.pl line 9. > I have perl scripts here > /home/merijn 104 > That's exactly the opposite problem you're having there. Just remove the 2nd my...Thread Previous | Thread Next