Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Using a hash with the @ sigil

by 1nickt (Canon)
on Jul 24, 2015 at 23:28 UTC ( [id://1136246] : perlquestion . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    $ perl -Mstrict -wle"my %hash; @hash{'array'} = 'foo';"
    Scalar value @hash{'array'} better written as $hash{'array'} at -e lin
    +e 1.
  2. or download this
    $ perl -Mstrict -wle"my %hash; my @array; @hash{@array} = 'foo';"