Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Updating a text file

by swkronenfeld (Hermit)
on Aug 11, 2003 at 18:18 UTC ( #282969=note: print w/ replies, xml ) Need Help??


in reply to Updating a text file

Kirk, I *think* what you're trying to do is not rewrite the file unless it changed. If that's the case, then instead of your "next" line, do

if($change_count) { open(OUT,">c:\\h\\CSSCS\\bin\\scripts\\ListofFile.txt") || "Can't op +en file for writing:$!\n"; print OUT @lines; close OUT; }


Comment on Re: Updating a text file
Download Code
Replies are listed 'Best First'.
Re: Re: Updating a text file
by crouchingpenguin (Priest) on Aug 12, 2003 at 14:54 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (17)
As of 2015-07-29 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls