Help for this page

Select Code to Download


  1. or download this
    my $infile = $ARGV[0];
    infile ($infile);
    ...
    
    open( my $infile, '<', $ARGV[0] ) or die "cannot open file: $!";
    # ...
    
  2. or download this
    my $infile = $ARGV[0];
    process_file ($infile);
    ...
         my $current_file = shift; # or: my $current_file = $_[0];
         open my $FILEHANDLE, '<', $current_file or die "cannot open file 
    +$current_file: $!";
         # ...