in reply to How to store matched $1 values one by one to array?
G'day rekhasri,
Welcome to the monastery.
Take a look at the push function.
I can't see anywhere in your code where you're adding anything to an array. However, what you've written is rather difficult to read: take a look at Markup in the Monastery.
You probably want something like:
my @agent_ids; # outside logfile reading loop ... if (...) { ... push @agent_ids, $agent_id; }
-- Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to store matched $1 values one by one to array?
by rekhasri (Initiate) on Feb 02, 2013 at 07:56 UTC | |
by kcott (Archbishop) on Feb 02, 2013 at 08:03 UTC | |
by rekhasri (Initiate) on Feb 02, 2013 at 09:15 UTC | |
by trizen (Hermit) on Feb 02, 2013 at 11:12 UTC | |
by choroba (Cardinal) on Feb 02, 2013 at 11:12 UTC |
In Section
Seekers of Perl Wisdom