in reply to Re^2: How to split file for threading?
in thread How to split file for threading?
If you can search the whole line without breaking it up, this:
for my $line (<INFILE>) { chomp $line; my @splitline = split("\t", $line); #my $poskey = $splitline[0] . ":" . $splitline[1]; for (@splitline){ if (/^$ARGV[1]/){ $filter_count++; push(@rawfile,$line); } } }
can become this:
while (my $line = <INFILE>) { chomp $line; if ($line =~ /^$ARGV[1]/){ $filter_count++; push(@rawfile,$line); } }
-stevieb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to split file for threading?
by afoken (Chancellor) on Jun 23, 2015 at 16:40 UTC | |
|
Re^4: How to split file for threading?
by diyaz (Beadle) on Jun 23, 2015 at 15:52 UTC |