slinky66 has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I am experiencing some weirdness inside my if/elsif/else block. The "if" condition is returning false and falling through even though the file being checked in the "if" condition does exist. Any ideas?
use strict; my $line; if ( -e "/usr/www/htdocs/images/items/350/$itemid.jpg") { $line .= "http://www.store.com/images/items/350/$itemid.jp +g"; } elsif ( -e "/usr/www/htdocs/images/items/215/$itemid.jpg" ){ $line .= "http://www.store.com/images/items/215/$itemid.jp +g"; } else { $line .=""; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: -e falling through
by Anonymous Monk on Dec 08, 2009 at 16:38 UTC | |
by slinky66 (Initiate) on Dec 08, 2009 at 17:20 UTC | |
by ikegami (Patriarch) on Dec 08, 2009 at 17:05 UTC |