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

Re: Thread safe equivalent of LINUX touch command

by RichardK (Parson)
on Nov 22, 2012 at 15:48 UTC ( #1005153=note: print w/replies, xml ) Need Help??

in reply to Thread safe equivalent of LINUX touch command

Does utime do what you need?

the help says :-

For example, this code has the same effect as the Unix touch(1) comman +d when the files already exist and belong to the user running the program: #!/usr/bin/perl $atime = $mtime = time; utime $atime, $mtime, @ARGV;

Don't know about thread safety though, but why would you care ?

Replies are listed 'Best First'.
Re^2: Thread safe equivalent of LINUX touch command
by GotToBTru (Prior) on Feb 12, 2015 at 20:39 UTC

    utime will not create the file if it does not exist; that is one difference with touch.

    Dum Spiro Spero

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005153]
[GotToBTru]: many times i've been told I made a real hash of thiings
[GotToBTru]: so .. perhaps it should b e
[thepkd]: Just wondering why $aohoaoh[0]->{'foo '}[0]->{'bar'} would be difficult to read and understand?
[thepkd]: I am a noob and find it easier
[thepkd]: I mean with the branching clearly defined
[GotToBTru]: what is clear and what is not can be personal
[LanX]: actually you can skip the arrows in between and it will still work
[choroba]: -> between curlies and square brackets is optional

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2016-12-06 13:55 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (105 votes). Check out past polls.