in reply to Re: Parsing in perl?
in thread Parsing in perl?

Or without the $` ( $PREMATCH ) imposed penalty ( see, depending on your shell, perldoc -v "$`" or perldoc -v '$`') , its more Modern Perl-ish

#!usr/bin/perl -- use strict; use warnings; use autodie qw/ open close /; # error checking open my($file), '<', 'gene.txt'; while( <$file> ){ print $1 if /^([^:]+):/; } close $file;