Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Best way to print variables in regex

by tangent (Vicar)
on Jan 22, 2014 at 03:04 UTC ( #1071559=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $filename = '/path/to/file.csv';
    open (my $fh, '>', $filename) or die "Could not open $filename, $!";
    ...
    print $fh join(',', map($tags{$_} || 0, @headers) ) . "\n";
    
    close $fh;
    
  2. or download this
    use Tie::Array::CSV;
    my $filename = '/path/to/file.csv';
    ...
    push(@file,\@row);
    
    untie @file;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-08-08 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?