Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Combining 3 files

by Anonymous Monk
on Jun 27, 2011 at 10:27 UTC ( [id://911539]=note: print w/replies, xml ) Need Help??

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;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://911539]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found