while($line=<>) { chomp $line; if($line =~ /^\.949\./) { while($line =~ /\|i([^|]*).*\|l([^|]*)/g) { ($barcode,$homeloc) = ($1,$2); print "$barcode|$homeloc|\n"; } } }
In reply to execute loop code for every occurence of regex by aquarium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |