in reply to What is the fastest way to extract data from a delimited string?
Updated.open(FH, 'cut -d" " -c6 file|') or die $!; # or open(FH, "awk '{print \$6}' file|") ... while(<FH>) { ... } close FH or die $!; # Check close on pipe opens # Also, you might try a regex which # uses qr and only saves what you want my $re = qr/(?:\S+\s+){5}(\S+)/; ... while (<FH>) { next unless $_ =~ $re; my $field = $1; ... }
|
|---|