in reply to Re: What does the dash before hash assignment means?
in thread What does the dash before hash assignment means?

"...is not a hash assignment"

It is.

#!/usr/bin/env perl + use strict; use warnings; print fun(-nose =>'cuke') . qq(\n); sub fun { my %args = @_; return $args{-nose}; } __END__ karls-mac-mini:monks karl$ ./fun.pl cuke

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^3: What does the dash before hash assignment means?
by Corion (Patriarch) on Sep 03, 2013 at 13:57 UTC

    Not really - the arguments to the function call construct a list:

    -nose =>'cuke' # even-sized list

    The hash assignment happens here:

    my %args = @_;

      OK, thats true.

      Thanks, Karl

      «The Crux of the Biscuit is the Apostrophe»