use warnings; use strict; my @lines = ( # where '\t' is a real tab "one\ttwo\tthree", "four\tfive\tsix", ); for my $line (@lines){ my $str = (split /\t/, $line)[0]; $str =~ s/.$//; print "$str\n"; } __END__ on fou