my $found=undef; while (<FILE>){ if ($found eq $number and /^-/) { print COPYFILE "$_\n"; } elsif (/^($name)/o) { $found = $1; } } close (COPYFILE); close (FILE);
Untested, mother aproved. ;)
In reply to Re: regex issue
by exussum0
in thread regex issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |