Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Using read/write to update a file

by blue_cowdawg (Monsignor)
on Oct 14, 2014 at 18:51 UTC ( [id://1103788]=note: print w/replies, xml ) Need Help??


in reply to Using read/write to update a file

Try this:

#!/usr/bin/perl -w use strict; use Tie::File; tie my @ry,"Tie::File","myfile.csv" or die $!; $_ =~ s/foo/bar/g for @ry; untie @ry;


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; Blog: http://blog.berghold.net Warning: No political correctness allowed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2025-01-14 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (38 votes). Check out past polls.