while (<$fh_in>) { print; #prints $_ (the line from $fh_in) my ($first_thing) = split(';',$_); print "$first_thing\n"; }