in reply to read value from file won't pass if exists??
!/usr/bin/perl -w open MISS, "miss" or die "can't open $!"; my $miss=<MISS>; close MISS; my %clocks=( "10" => 0, "10.20.20.10" => 0, "10.20.47.13" => 0, "10.20.46.37" => 0, ); chomp $miss; # $miss="10.20.47.13"; print "$miss\n"; if (exists($clocks{$miss})){ print "Yup it's there\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: read value from file won't pass if exists??
by lcollins (Novice) on Jan 04, 2005 at 14:53 UTC | |
by Eimi Metamorphoumai (Deacon) on Jan 04, 2005 at 15:34 UTC |