Thargor has asked for the wisdom of the Perl Monks concerning the following question:
This is similar to my last question but instead of input it is output. I am using:
my $fh = new IO::File "> output.csv"; foreach my $hash ( %hashed){ if($hashed{$hash}){ print "$hash has data $hashed{ $hash }->[0]\n"; $status = $csv->print($fh, $hashed{ $hash }); } }
This prints everything out to a csv file my problem is it prints everything out on 1 line instead of an individual line for each key of the hash. My has is a hash of array refs where the keys are unique id's from the array refs they point at. So, my question is am I just not using the print function correctly or is it something to do with my hash?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printing CSV to file?
by trammell (Priest) on May 10, 2005 at 15:24 UTC | |
by Thargor (Scribe) on May 10, 2005 at 16:43 UTC | |
|
Re: printing CSV to file?
by dragonchild (Archbishop) on May 10, 2005 at 15:17 UTC | |
|
Re: printing CSV to file?
by Joost (Canon) on May 10, 2005 at 15:16 UTC | |
by Thargor (Scribe) on May 10, 2005 at 17:10 UTC | |
|
Re: printing CSV to file?
by tphyahoo (Vicar) on May 10, 2005 at 16:15 UTC | |
|
Re: printing CSV to file?
by shemp (Deacon) on May 10, 2005 at 17:15 UTC | |
|
Re: printing CSV to file?
by jZed (Prior) on May 10, 2005 at 17:23 UTC |