s_gaurav1091 has asked for the wisdom of the Perl Monks concerning the following question:
my $temp; my $code; my $info; my $count = 0; my $length = scalar@contents; for(my $i=0;$i<=$length;$i++) { chomp($contents[$i]); if($contents[$i] =~ /\w+=(\d+)/){ $code = $1; $code1 = $code; chomp($contents[$i+1]); $info = $contents[$i+1]; substr($info,0,5) = ""; $temp = substr($code ,0,1); #print "$temp --> code\n"; if($temp == 1) { $tier = "WEB"; } if($temp == 2) { $tier = "APP"; } if($temp == 3) { $tier = "DB"; } if($code1 != 0) { $severity = 1; } if($code1 = 0) { $severity = 5; } #print "$code1 --> $tier\n"; $message = "<event id=\"ALERT_$tier_$code1\" source=\" +APP\">"; print "$message --messgae\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: the variable is not getting assigned
by GrandFather (Saint) on Jan 11, 2006 at 04:47 UTC | |
by blazar (Canon) on Jan 11, 2006 at 09:50 UTC | |
|
Re: the variable is not getting assigned
by ikegami (Patriarch) on Jan 11, 2006 at 05:39 UTC | |
|
Re: the variable is not getting assigned
by jbrugger (Parson) on Jan 11, 2006 at 06:57 UTC | |
by pKai (Priest) on Jan 11, 2006 at 08:50 UTC | |
by davidrw (Prior) on Jan 12, 2006 at 05:49 UTC | |
|
Re: the variable is not getting assigned
by s_gaurav1091 (Beadle) on Jan 11, 2006 at 04:55 UTC | |
by blazar (Canon) on Jan 11, 2006 at 09:43 UTC |