Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Reopen file when contents changed?

by thcsoft (Monk)
on Jun 07, 2005 at 14:09 UTC ( #464311=note: print w/replies, xml ) Need Help??

in reply to Reopen file when contents changed?

if you're on a unix/linux system, you'ld be better off with a shell script.

language is a virus from outer space.

Replies are listed 'Best First'.
Re^2: Reopen file when contents changed?
by bofh_of_oz (Hermit) on Jun 07, 2005 at 14:34 UTC
    Possibly, but AFAIK forking a shell requires resources, which will impact the measurements; opening a file will not...

    An idea is not responsible for the people who believe in it...

      Forking anything would require resources... There is no need to fork just to read the contents of a file. But anyway, I think keeping the file open and just seek(0) is easier than opening the file everytime. I don't know how much impact open() would generate on load, but I do think seek(0) would cause even less impact.
Re^2: Reopen file when contents changed?
by salva (Canon) on Jun 07, 2005 at 14:33 UTC

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-12-02 19:25 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (18 votes). Check out past polls.