splatohara has asked for the wisdom of the Perl Monks concerning the following question:
while ($line=<In>) { @temp = split(/[=]/,$line); if ($temp[1] >100) { print "Session id: $temp[1] "; $sessid = $temp[1]; } #I want the following to run only if $sessid changes $modtyp = $temp[1]; if($modtyp == 20) { print " V34\n\n "; } elsif ($modtyp == 9) { print " no connection\n\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: runnig part of script when variable changes
by vek (Prior) on Feb 21, 2002 at 13:49 UTC | |
by splatohara (Novice) on Feb 21, 2002 at 14:50 UTC | |
by vek (Prior) on Feb 21, 2002 at 16:13 UTC | |
|
Re: runnig part of script when variable changes
by splatohara (Novice) on Feb 21, 2002 at 17:33 UTC | |
by rdfield (Priest) on Feb 22, 2002 at 10:33 UTC |