diamich has asked for the wisdom of the Perl Monks concerning the following question:
The script as written, produces the path: /home/diamich/public_html/cgi-bin/linkmanage/templates//master.htm when it should produce: "/home/diamich/public_html/cgi-bin/linkmanage/templates/default/master.htm The code written that produces the faulty path is:
Is there something missing that is causing the code to miss the "default/" addendum to $file? Any help you could give me would be greatly appreciated. Thanks in advance.my($thebase) = ($file =~ /(.*)\/[^\/]+/); my($html,$html2); if (!-e $file){ $thebase =~ s/\/[^\/]+$/\/default/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble with path syntax
by bm (Hermit) on Aug 29, 2003 at 16:11 UTC | |
by diamich (Initiate) on Aug 29, 2003 at 16:39 UTC | |
|
Re: Trouble with path syntax
by hardburn (Abbot) on Aug 29, 2003 at 13:46 UTC | |
|
Re: Trouble with path syntax
by tcf22 (Priest) on Aug 29, 2003 at 13:52 UTC | |
by diamich (Initiate) on Aug 29, 2003 at 14:06 UTC | |
|
Re: Trouble with path syntax
by wirrwarr (Monk) on Aug 29, 2003 at 15:23 UTC | |
by diamich (Initiate) on Aug 29, 2003 at 16:07 UTC | |
|
Re: Trouble with path syntax
by roju (Friar) on Aug 29, 2003 at 20:10 UTC | |
|
Re: Trouble with path syntax
by hmerrill (Friar) on Aug 29, 2003 at 15:58 UTC |