Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
BEGIN { $0 =~ '(.*[\\\/])\w+\.\w+$'; $curr_dir = $1 || "./"; } open (FILE, "<${curr_dir}info.txt") || print "There is no INFO file he +re $0"; while ( my $line = <FILE> ) { ...code here... } #It doesn't work...
open (FILE, "<c:/progra~1/apache~1/apache2/htdocs/info.txt") || print +"There is no INFO file here $0"; while ( my $line = <FILE> ) { ...code here... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File Open Issue
by jZed (Prior) on May 31, 2005 at 15:52 UTC | |
by Anonymous Monk on May 31, 2005 at 16:07 UTC | |
by jZed (Prior) on May 31, 2005 at 16:11 UTC | |
|
Re: File Open Issue
by thundergnat (Deacon) on May 31, 2005 at 20:03 UTC | |
by Anonymous Monk on Jun 01, 2005 at 12:38 UTC | |
by thundergnat (Deacon) on Jun 01, 2005 at 13:59 UTC | |
|
Re: File Open Issue
by zentara (Cardinal) on May 31, 2005 at 17:01 UTC | |
|
Re: File Open Issue
by tchatzi (Acolyte) on May 31, 2005 at 23:12 UTC | |
by Anonymous Monk on Jun 01, 2005 at 12:20 UTC | |
by BrowserUk (Patriarch) on Jun 01, 2005 at 12:26 UTC | |
by Anonymous Monk on Jun 01, 2005 at 12:41 UTC | |
by BrowserUk (Patriarch) on Jun 01, 2005 at 13:30 UTC |