Help for this page

Select Code to Download


  1. or download this
         # what is going on here? What am i dealing with?
            print " $token->[2]\n  ";     # how do i dereference this?
    
  2. or download this
         use Data::Dumper;
         print Dumper $token->[2];
    # or w/o Data::Dumper
         print join(":", keys %{$token->[2]}), "\n";
    
  3. or download this
          
          my %hash = $token->[2];
            #    below wont work unless i feed it a hash
    ...
            #    foreach $key (keys %hash) {
            #    print "at $key we have $hash{$key}\n";
            #    }
    
  4. or download this
          my $hash = $token->[2];
          foreach my $key (keys %$hash) {
              printf "at %s we have %s\n", $key, $hash->{$key};
          }
    
  5. or download this
          my %hash = %{$token->[2]};
          foreach my $key (keys %hash) {
              printf "at %s we have %s\n", $key, $hash{$key};
          }