open my $fd, '<', $file or die "Can't open file: $!"; while(my $line = <$fd>){ # do stuff with line in $line } #### my @fields = split /\t/, $line; # split the line on tabs # or my( $threadnum ) = $line =~ /Thread-(\d+)/; # grab the digits following Thread-