Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 (Canon)
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 lurking in the Monastery: (11)
As of 2015-07-06 15:21 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 (77 votes), past polls