Help for this page

Select Code to Download


  1. or download this
    open my $file, "<", $filename # use lexical variable
    
    open FILE, "<", $filename # use bareword.
    
  2. or download this
    sub foo {
      my ($filename) = @_;
    ...
      }
      # explicit call to close not needed.
    }