- or download this
#declare all filenames
$filename1 = 'one.txt';
$filename2 = 'two.txt';
$filename3 = 'three.txt';
- or download this
#open text file 1
open (FILE1, $filename1) or die "Unable to open $filename1 because $!\
+n";
- or download this
# Store the contents of the first file into $hash{col1_col2}
...
$hash{$key1}++;
};
close FILE1;
- or download this
while ($line = <FILE2>) {
chomp ($line);
...
$hash{key2}++
}
};
- or download this
while ($line = <FILE2>) {
chomp ($line);
...
$hash{key2}++
}
};
- or download this
open (FILE2, $filename2) or die "Unable to open $filename2 because $!\
+n";
...
}
};
close FILE2;
- or download this
sub process_file {
my $filename = shift or die "Missing filename!";
...
}
close FILE;
}
- or download this
process_file($filename2);
process_file($filename3);