Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Welcome to the Monastery
 
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 (Abbot)
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
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 (Scribe) 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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2014-04-17 07:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (441 votes), past polls