Help for this page

Select Code to Download


  1. or download this
    sub foo {
       open FILE, "file.txt";
       bar();
    ...
       my @lines = <FILE>;
       # do something here
    }
    
  2. or download this
    sub foo {
       open my $file, "file.txt";
       bar($file);
    ...
       my @lines = <$file>;
       # do something here
    }