my $text = "foo\tbar"; $text =~/(.*?)\t/; print "$1\n"; my ($first) = split /\t/, $text; print $first;