Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Reopen file when contents changed?

by bofh_of_oz (Hermit)
on Jun 07, 2005 at 14:34 UTC ( #464321=note: print w/replies, xml ) Need Help??


in reply to Re: Reopen file when contents changed?
in thread Reopen file when contents changed?

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...

  • Comment on Re^2: Reopen file when contents changed?

Replies are listed 'Best First'.
Re^3: Reopen file when contents changed?
by ruoso (Curate) on Jun 07, 2005 at 18:14 UTC
    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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-08-18 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?