Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Win32: Setting a layer with binmode causes problem with close() on Windows (PerlIO silently fails to close the file)

by BrowserUk (Patriarch)
on Jun 17, 2013 at 10:39 UTC ( [id://1039328]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\test>junk44
    Permission denied : The process cannot access the file because it is b
    +eing used by another process at C:\test\junk44.pl line 30.
    perl.exe pid: 17320 PB-IM2525-AIO\HomeAdmin :    60: File  (RW-)   C:\
    +test\ttz
    cmd.exe pid: 17324 PB-IM2525-AIO\HomeAdmin :    60: File  (RW-)   C:\t
    +est\ttz
    handle.exe pid: 16152 PB-IM2525-AIO\HomeAdmin :    60: File  (RW-)   C
    +:\test\ttz
    
  2. or download this
    cmd.exe /x/d/c "cmd /c echo xx >$file"
    
  3. or download this
    use strict;
    use warnings;
    ...
    if( !unlink($file) ) {
        warn $!, ' : ', $^E;
    }
    
  4. or download this
    ## In a different session from which I will run my modified version of
    + your script
    C:\test>echo xx > ttz
    ...
    ## And back in the first session whilst the 10 second sleep is running
    C:\test>handle | find "ttz"
       60: File  (RW-)   C:\test\ttz
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found