use strict; use warnings; while (<DATA>) { chomp; my ($dir, $crap) = split ' ', $_, 2; printf "%s\n", $dir eq 'INVALID' ? $dir.' '.$crap : $crap; } __DATA__ /base-dir/dir/foo.txt INVALID ORDER-NO 4546090 /base-dir/dir/foo.txt INVALID ORDER-NO 4546090 INVALID ORDER-NO 4546090 INVALID ORDER-NO 4546090
In reply to Re: A poor bloke and his regex...
by Anonymous Monk
in thread A poor bloke and his regex...
by vek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |