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 @_.
In reply to Re: Re: flock with anonymous filehandle
by wog
in thread flock with anonymous filehandle
by Xxaxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |