My homework:
my $flag = 0; while (<DATA>) { ($flag = ($1 eq "AUTHOR"), next) if /\{(\w+)\}/; print $_ if $flag; }
No need to chomp... record terminator will be used in the output.
In reply to Re^4: regular expression
by vitoco
in thread regular expression
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |