in reply to Re: pattern matching
in thread pattern matching
But I don't see the point of @users anyway. First, its misnamed. It doesn't really contain 'users', it contains data for one 'user'. You're setting it to '($line)' then resetting it on the very next line. If you really mean to collect 'users' in this array, then you wouldn't use my on the push statement, but you'd declare (my) '@users' in an outer block somewhere.>> push my(@users), $line; # or even more straightforward: my @users = ($line);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: pattern matching
by blakem (Monsignor) on Sep 06, 2001 at 22:52 UTC |