- or download this
$href->{port_list} # correct
- or download this
$href{port_list} # incorrect - assumes a hash %href
- or download this
#!/usr/bin/perl -l
...
print "size=", scalar @{$module->{port_list}}; # ok
print "size=", scalar @{$module{port_list}}; # not ok!
- or download this
$ ./835728.pl
Name "main::module" used only once: possible typo at ./835728.pl line
+9.
...
Use of uninitialized value $module{"port_list"} in array dereference a
+t ./835728.pl line 9.
Use of uninitialized value $module{"port_list"} in concatenation (.) o
+r string at ./835728.pl line 9.
size=
- or download this
$ ./835728.pl
Global symbol "%module" requires explicit package name at ./835728.pl
+line 9.
Execution of ./835728.pl aborted due to compilation errors.