Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: File::Temp acting strange under Windows XP

by Kenosis (Priest)
on Dec 01, 2012 at 00:14 UTC ( #1006540=note: print w/ replies, xml ) Need Help??


in reply to File::Temp acting strange under Windows XP

Your script produced similar results under Win7 when I ran it. However, the following ran equally well on Win7 and Lunix:

use warnings; use strict; use File::Temp qw/tempfile/; my $fh = File::Temp->new(); print "$_\n" for 0 .. 4; $fh->seek( 0, 0 ); print for <$fh>; close $fh

Output:

0 1 2 3 4

IO::File's new_tmpfile can also be used like File::Temp--in case it may work better for you:

... use IO::File; my $fh = IO::File->new_tmpfile or die $!; ...


Comment on Re: File::Temp acting strange under Windows XP
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2015-07-31 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls