Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How can one create a folder B in D drive and save results in a text file inside B using perl script?

by LanX (Bishop)
on Dec 10, 2012 at 05:04 UTC ( #1008038=note: print w/replies, xml ) Need Help??


in reply to How can one create a folder B in D drive and save results in a text file inside B using perl script?

not

open (my $fh,">D://B/",$output)

Perl tries to parse a IO layer like ":utf8" or ":raw" are.

Better

open (my $fh,">", "D://B/$output")

( I'm not sure about the slashes under win.)

You've been already pointed to mkdir and read open again.

And please do close $fh; not close $output;

Cheers Rolf

  • Comment on Re: How can one create a folder B in D drive and save results in a text file inside B using perl script?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: How can one create a folder B in D drive and save results in a text file inside B using perl script?
by supriyoch_2008 (Monk) on Dec 10, 2012 at 07:09 UTC

    Hi LanX,

    Thank you very much for constructive suggestions. I shall try once again.

    With Regards,

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008038]
help
Chatterbox?
[ambrus]: Corion: exactly. by pre-forking you avoid that, because you spawn processes from a smaller process that never uses threads and is kept only to spawn things
[ambrus]: (and to wait for the spawned stuff)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-10-19 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (255 votes). Check out past polls.

    Notices?