Help for this page

Select Code to Download


  1. or download this
    my $Usage = "Usage: $0  file1  file2 > combined.file\n";
    die $Usage unless ( @ARGV == 2 and -f $ARGV[0] and -f $ARGV[1] );
    
    my ($inf1,$inf2) = @ARGV;
    
  2. or download this
    open( IN1, $inf1 ) or die "Can't open $inf1: $!";
    
  3. or download this
    my %file1;
    
    ...
        $file1{$key} = $val;
    }
    close IN1;
    
  4. or download this
    open( IN2, $inf2 ) or die "Can't open $inf2: $!";
    while (<IN2>) {
    ...
        $file1{$key} .= ";$val";
    }
    close IN2;
    
  5. or download this
      perl_script  infile.a infile.b > outfile  2> script.errs