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

(ar0n) Re: crontab and perl script using system

by ar0n (Priest)
on Jul 19, 2001 at 13:51 UTC ( [id://98020]=note: print w/replies, xml ) Need Help??


in reply to crontab and perl script using system

I don't like golf that much, but...
use IO::File; IO::File->new(">$ENV{HOME}/.bash_history") or die "Can't empty history +: $!\n";
Since new returns a reference to a filehandle, but because that reference isn't saved, the refcount drops to zero and the file is closed right after opening.

IO::File is included with the distribution, btw

ar0n ]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-29 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found