while (<$fh_in>) { chomp; #deletes the trailing "new line" line ending #this works for files from any OS my @array = split(';',$_); } #### while (<$fh_in>) { print; #prints $_ (the line from $fh_in) my ($first_thing) = split(';',$_); print "$first_thing\n"; }