Help for this page

Select Code to Download


  1. or download this
    "C:\\windows\\file.txt"
    
  2. or download this
    my $filename="C:\\windows\\file.txt" ; ## or "C:/windows/file.txt" 
    
    open (my $fh, "<", $filename) or die "Could not open $filename: $!";
    
  3. or download this
    while (<$fh>){
      # Process the contents of the record
    ...
    }
    
    close $fh or warn "Could not close $filename:$!";