Help for this page

Select Code to Download


  1. or download this
     my @beef = @{ $dataset->{ $col[0] } };
    
  2. or download this
    my $key  = $col[0] ;
    my $meat = $dataset->{ $key };
    my @beef = @{ $meat };
    
  3. or download this
    ## no warnings or errors
    $ perl -e "print @{ undef() }; print 6"
    ...
    ## with strict the warning is fatal, 6 not printed cause program died
    $ perl -Mstrict -we "print @{ undef() }
    Can't use an undefined value as an ARRAY reference at -e line 1.
    
  4. or download this
    next unless $meat;
    
  5. or download this
    push @{$data[$nr - 1]->{shift(@cols)}},\@cols;
    
  6. or download this
    push @{ $data[ $nr - 1 ]->{ shift(@cols) } }, \@cols;
    
  7. or download this
    push @{
        $data[ $fileCount ]->{
            shift @col
        }
    },  \@col;
    
  8. or download this
    my $Hashref = $data[ $fileCount ];
    if( not $Hashref){
    ...
        $Arrayref = $Hashref->{ $key } = [];
    }
    push @{ $Arrayref },  \@col;
    
  9. or download this
    my $Hashref = $data[ $fileCount ];
    if( not $Hashref){
    ...
        $Arrayref = $Hashref->{ $key } = \@newArrayThatIsOnlyNamedHere;
    }
    push @{ $Arrayref },  \@col;