Help for this page

Select Code to Download


  1. or download this
    sub read_file {
       open my $FH, '<', 'FileName' or die $!;
    ...
          ....process lines...
       }
    }
    
  2. or download this
    # Here we're at the top level of a script
    open my $FH, '<', 'FileName' or die $!;
    ...
    # Now we're sleeping for 5000 seconds, and FileName is still open, bec
    +ause the program still
    # has $FH accessible.
    sleep 5000