No, ( ) is used for lists. Lists are converted into arrays by assignment. Also, lists are converted into hashes by assignment.
Example: note the addition of the `undef` to make the hash work properly.
#!/usr/bin/env perl use strict; use warnings; use feature qw( :all ); # -------------------------------------- # Modules use Data::Dumper; # Make Data::Dumper pretty $Data::Dumper::Sortkeys = 1; $Data::Dumper::Indent = 1; # Set maximum depth for Data::Dumper, zero means unlimited local $Data::Dumper::Maxdepth = 0; # -------------------------------------- my @a = my %h = ( 1, 2, 3 ); say Dumper \@a; say Dumper \%h;
In reply to Re^4: Subarray in a hash: Can't use string ("STRING") as a HASH ref while "strict refs" in use
by shawnhcorey
in thread Subarray in a hash: Can't use string ("STRING") as a HASH ref while "strict refs" in use
by GeoJunkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |