Do you know where your variables are? | |
PerlMonks |
Re: TIMTOWTDI Challenge: Open a fileby fizbin (Chaplain) |
on Apr 20, 2006 at 15:52 UTC ( [id://544632]=note: print w/replies, xml ) | Need Help?? |
What? No one's mentioned the swiss army chainsaw of of IO operations, IO::All ? From the docs: And if you want to write to the file, you've got that too:
Ignoring abominations like that module, there's also this trick: Which trick is actually useful if you want to do more than open a file; e.g. if you want to run some external program that needs a special environment set up before you invoke it, like tying STDERR to STDOUT, or ensuring that STDIN is closed, or that the program is disassociated from the controlling terminal via a call to POSIX::setsid. (java processes that you want running in the background are sometimes picky about being completely disassociated from the controlling terminal)
--
In Section
Meditations
|
|