perl -we "use strict; open FH, '>', 'text.txt'; open FH, '>', 'text.txt';" perl -we "use strict; open my $fh, '>', 'text.txt'; open my $fh, '>', 'text.txt';" "my" variable $fh masks earlier declaration in same scope at -e line 1.