Help for this page

Select Code to Download


  1. or download this
    print "Enter file name:\n";
    chomp(my $file = <STDIN>);
    open(DATA,$file);
    
  2. or download this
    chomp(my $infile = shift);
    open(DATA,$infile) or die "Could not open $infile\n";
    
  3. or download this
    chomp (my $outfile = shift);
    open OUTPUT, '>', $outfile or die "Could not open $outfile\n";
    
  4. or download this
      printf "%-4s: %20s,  %-8s %6s\n",
    
  5. or download this
      printf OUTPUT "%-4s: %20s,  %-8s %6s\n",