http://www.perlmonks.org?node_id=1008038


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,