Help for this page

Select Code to Download


  1. or download this
    perl -we "use strict; open FH, '>', 'text.txt'; open FH, '>', 'text.tx
    +t';"
    
    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
    +.
    
  2. or download this
    use strict;
    
    ...
    open FH, '<', 'filename'; # now ok
    open my $fh, 'filename';  # now ok