in reply to if statement doesnt work
use strict; ... my $found = 0; if ( $input ) { foreach my $image ( @files ) { # are you just looking to see if image CONTAINS input? if ( $image =~ /$input/ ) { $found = 1; last; } } } print "$input ".($found ? "found" : "not found")."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: if statement doesnt work
by Anonymous Monk on Feb 14, 2005 at 19:27 UTC |