use strict; use warnings; my $found_match = 0; while (<DATA>) { s/\s+$//; if (/^\d/) { $found_match = 0; } if (!$found_match && /^\d*\s+(LA.*)/) { print("$1\n"); $found_match = 1; } } __DATA__ 1 LA-1-00 2 CON-1-0 LA-2-01 3 LA-03-2 LA-03-02
In reply to Re^3: How to get a value from a file and save in another file
by ikegami
in thread How to get a value from a file and save in another file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |