mgabalins has asked for the wisdom of the Perl Monks concerning the following question:
Which gives me error "No such file or directory" on file open. File definitely exists - I can reach it and open it with file manager. Some files are opened normally, most give this error. I am really out of ideas and some help will be appreciated. Environment: Windows 10 x64, PERL: Strawberry perl v. 5.24 Thanks in advance. Sincerely Maris#!/usr/bin/perl use strict; use warnings; use File::Spec; use IO::File; use autodie; my $FH; my @lines; my $fn = 'D:\DATA\Software\MFLOW2\MOD_CL\INSTALL\MOD_CL\INSTALL\RDBMS\ +c$template.pks'; #my $fn = '..\todo.txt'; $fn = File::Spec->rel2abs( $fn ) ; print "file: $fn len=" . length($fn) . "\n"; open ($FH,'<',$fn); @lines=<$FH>; close($FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PERL/Windows file open error
by davido (Cardinal) on Mar 04, 2019 at 17:17 UTC | |
|
Re: PERL/Windows file open error
by poj (Abbot) on Mar 04, 2019 at 15:51 UTC | |
|
Re: PERL/Windows file open error
by Laurent_R (Canon) on Mar 04, 2019 at 15:46 UTC | |
|
Re: PERL/Windows file open error
by thanos1983 (Parson) on Mar 04, 2019 at 16:05 UTC | |
by haukex (Archbishop) on Mar 04, 2019 at 21:26 UTC | |
|
Re: PERL/Windows file open error
by mgabalins (Initiate) on Mar 04, 2019 at 19:58 UTC | |
|
Re: PERL/Windows file open error
by BillKSmith (Monsignor) on Mar 04, 2019 at 16:12 UTC |