in reply to Re^3: Perl Log file extraction help required
in thread Perl Log file extraction help required

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