in reply to Re: flock with anonymous filehandle
in thread flock with anonymous filehandle
The syntax used is perfectly fine. The thing that one must remember when using @_ is that:
my $arg = @_;
will assign the number of arguments to $arg, but:
my($arg) = @_;
will assign the first argument to $arg. (The ()s give list context to the right-hand side of the my assignment.)
update: Of course, one must also remember to assign all the arguments at once when using @_.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: flock with anonymous filehandle
by Xxaxx (Monk) on Jun 10, 2001 at 06:32 UTC | |
by Anonymous Monk on Jun 11, 2001 at 13:24 UTC |