G'day Generoso,
You can add -l to the shebang line instead of restructuring the code. This produces the same output:
#!/usr/bin/env perl -l use strict; use warnings; while (<DATA>) { my @caught = /\{([^}]+)/g; next unless @caught; print for @caught; }
See perlrun for a description of this option.
-- Ken
In reply to Re^4: Perl Log file extraction help required
by kcott
in thread Perl Log file extraction help required
by renjoooz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |