Well, it's not an inconvenience, but that does now highlight where you're going wrong.
Declare your array outside of whatever loop iterates over your logfile and replace my @array=$agent_id; with a push statement, as I indicated.
-- Ken
In reply to Re^3: How to store matched $1 values one by one to array?
by kcott
in thread How to store matched $1 values one by one to array?
by rekhasri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |