Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Easy way to check if a file is open needed. -- MSWin32

by Discipulus (Canon)
on Apr 09, 2019 at 07:06 UTC ( [id://1232332]=note: print w/replies, xml ) Need Help??


in reply to Re: Easy way to check if a file is open needed.
in thread Easy way to check if a file is open needed.

Hello choroba,

when I read

> The filehandle stays connected to it even if the file name changes

I said: oh what good news! But when I tried it appears to behaves differently on MSWin32: I suddendly get Permission denied at writetorenamed.pl line 13. after had printed 1 or 2 and the file get not renamed ;(

perl writetorenamed.pl Printed: 1. Printed: 2. Permission denied at writetorenamed.pl line 13. Printed: 3. Printed: 4. Printed: 5. Printed: 6. Printed: 7. Printed: 8. Printed: 9. Printed: 10. cat 1 1 2 3 4 5 6 7 8 9 10

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: Easy way to check if a file is open needed. -- MSWin32
by choroba (Cardinal) on Apr 09, 2019 at 07:35 UTC
    Yes, my comment is valid only for *nix and macOS.
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-18 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found