neversaint has asked for the wisdom of the Perl Monks concerning the following question:
I fail to open these two files with this snippet.~/MyPerl/ | |__ mycode.pl |__ subdir |____ data.pri |____ data.sec
What's wrong with it? How can I go about this problem? Thanks so much beforehand.# mycode.pl my $file = "/files/data.pri"; my $name = (split(/[\/\.]/,$file))[2]; my $file_sec = "/files/$name.sec"; my $result = some_function($file,$file_sec);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to Open Files from Subdirectory
by bart (Canon) on Aug 03, 2005 at 08:06 UTC | |
by neversaint (Deacon) on Aug 03, 2005 at 08:18 UTC | |
|
Re: How to Open Files from Subdirectory
by inman (Curate) on Aug 03, 2005 at 09:23 UTC | |
|
Re: How to Open Files from Subdirectory
by holli (Abbot) on Aug 03, 2005 at 08:16 UTC | |
|
Re: How to Open Files from Subdirectory
by anonymized user 468275 (Curate) on Aug 03, 2005 at 08:51 UTC | |
|
Re: How to Open Files from Subdirectory
by critter (Acolyte) on Aug 03, 2005 at 08:17 UTC | |
|
Re: How to Open Files from Subdirectory
by blazar (Canon) on Aug 03, 2005 at 10:04 UTC |