in reply to How do I process multiple files in parallel?
Here's a cheesy way of doing this, -- with some test data -- especially if the data is small enough to slurp into the program whole.
It uses regex from a different angle.
Hope this helped,#!/usr/bin/perl use strict; use warnings; undef $/; $_ = <DATA>; print "$1 $2 $3\n" while /Sen = (\S+).*?Acc = (\S+).*?Cor = (\S+).*?/sg; __DATA__ Sen = x1 Acc = y1 Cor = z1 Sen = x2 Acc = y2 Cor = z2 Sen = x3 Acc = y3 Cor = z3 Filler Sen = x4 Acc = y4 Cor = z4
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I process multiple files in parallel?
by Anonymous Monk on Feb 25, 2005 at 16:36 UTC |