#! /usr/bin/perl #colex.pl #4/14/2000 created #Author: Mafuyu Kitahara #Purpose: extract columns from psylexN or alike. #Input: psylexN #Output: psylexN.m-n print "file? = "; chop($file = ); print "initial column (counting from zero) = \n"; chop($m = ); print "final column = \n"; chop($n = ); open (DATA, "$file"); open (OUT, ">$file.$m-$n"); #print loop while () { chomp; @a = split; print OUT "@a[$m..$n]\n"; }