in reply to Re: Why can't I open a file for writing?
in thread Why can't I open a file for writing?

BTW, you might also try

use strict; use warnings, use autodie; open my $new_file, '>', qq($dir/subdirectory/$outputfile);

...instead of open NEWFILE, '>', "$dir/subdirectory/$outputfile" || die qq(Crap: $!)

See also Why the Modern Perl Book Avoids Bareword Filehandles and autodie.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help