Help for this page

Select Code to Download


  1. or download this
      $href->{port_list}   # correct
    
  2. or download this
      $href{port_list}     # incorrect - assumes a hash %href
    
  3. or download this
    #!/usr/bin/perl -l
    
    ...
    
    print "size=", scalar @{$module->{port_list}};   # ok
    print "size=", scalar @{$module{port_list}};     # not ok!
    
  4. 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=
    
  5. 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.