Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Expected fields to be an array ref

by armstd (Friar)
on Oct 11, 2011 at 04:10 UTC ( #930738=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        # Create ARRAYref to list of 7 elements, with first element "",
        # remaining 6 elements copied from @fields.
    ...
        # an ARRAYref to a list with 7 elements...
        my @fields2=$file2{$id}[5];
        my @fields3=$file3{$id}[5];
    
  2. or download this
        # just hang onto the ARRAYref returned from $csv->getline(),
        # unless it doesn't want us to.
    ...
        # You really did want the 6th column, right?
        my $fields2=$file2{$id}->[5];
        my $fields3=$file3{$id}->[5];
    
  3. or download this
        # Create list with one element as a string concat looking like
        # "ARRAY(0x141ecf8)\tARRAY(0x141edd0)\tARRAY(0x141ee48)"
        my @printline= ( $fields_ref."\t".\@fields2."\t".\@fields3;
        $csv->print ($FILE4,\@printline);
    
  4. or download this
        # List with 8 elements
        my @printline= ( @fields, $file2{$id}->[5], $file3{$id}->[5] );
        $csv->print ($FILE4,\@printline);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-09-21 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (171 votes), past polls