Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Think about Loose Coupling
 
PerlMonks  

Re: output caught in memory

by Wookie (Beadle)
on Jul 26, 2001 at 16:33 UTC ( [id://100040]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to output caught in memory

The easiest way to make sure the write occurs is to write it in two lines - and set your write buffers to instant write.

So try this:
$|=1; # $| is undef by default - which means use buffering - define it + as 1 - and it instantly writes. print FILE scalar localtime; print FILE " ## Exit\n"; close FILE;
Alternatively, you can try to build the entire entry into a variable first - then write it. So:
$close = localtime; print FILE "$close ## Exit\n"; close FILE;
I hope this helps :).

Update: Remove quotes around scalar localtime in first code block (thanks MZSanford)
game(Wookie,opponent) eq 'Wookie' ? undef $problem : remove_limbs(arms,opponent);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100040]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.