LHC RHC 111111111111 222222222222 444444444444 555555555555 666666666666 777777777777 888888888888 #### #!/usr/bin/perl use strict; use warnings; my $input = shift; my @first; my @second; my $counter = 0; if (!$input) {die "\nUsage: $0 inputfile\n"}; print STDERR "\nConverting file $input.\n"; open (INFILE, "< $input") or die "\nThe input file cannot be opened: \!\n"; while ( ) { chomp; s/^\s+//g; # get rid of leading spaces s/\n//g; ($first[$counter],$second[$counter]) = split(/[ ]{3,30}/,$_); # pretty much arbitrarily defined min and max $counter++; } close(INFILE); print "First column output:\n\n@first\n\n"; print "Second column output:\n\n@second\n\n";