Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $path="http://servername.com/username/images/"; my $imagename="filename.jpg"; my $imagedefault="default.jpg"; if ( -e '$path.$imagename'){ print "<"."code><td><IMG SRC=."$path.$imagename."></td></code".">"; } else { print "<" . "code><td><IMG SRC=".$path.$imagedefault."></td></code" ." +>"; }
20031210 Edit by Corion: Added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: How to check If file exists?
by merlyn (Sage) on Dec 09, 2003 at 21:46 UTC | |
by Anonymous Monk on Dec 09, 2003 at 22:22 UTC | |
by Anonymous Monk on Dec 09, 2003 at 22:50 UTC | |
|
Re: How to check If file exists?
by Enlil (Parson) on Dec 09, 2003 at 21:34 UTC | |
by Elijah (Hermit) on Dec 09, 2003 at 21:46 UTC | |
by b10m (Vicar) on Dec 09, 2003 at 21:44 UTC |