sub subgen { my($data) = shift; chomp($data); my($cur_segno) = 0; my(@sst) = (); open(FILE, $data); # or die "Cannot open: @data\n"; my $hdr = ; #read in the first line chomp $hdr; my @colnames = split /, ?/, $hdr; #split the header into an array