in reply to PERL/Windows file open error

Hello mgabalins,

Welcome to the Monastery. On the parameter my $fn = ..... c$template.pks is this a predefined parameter (that we can not see in the script) or the actual name of the file is c$template.pks?

I mean you have a file named e.g. my $template = 'file';?

If so you need to change the single quotes '' to "". Sample: my $fn = "D:\DATA\Software\MFLOW2\MOD_CL\INSTALL\MOD_CL\INSTALL\RDBMS\c$template.pks";

Looking forward to your reply.

BR / Thanos

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: PERL/Windows file open error
by haukex (Archbishop) on Mar 04, 2019 at 21:26 UTC
    my $fn = "D:\DATA\Software\MFLOW2\MOD_CL\INSTALL\MOD_CL\INSTALL\RDBMS\c$template.pks";

    Note that the backslashes need to be escaped in this case.