# # code preceded this.... use vars qw @ $ip_pairs @; my $ip_pairs = undef; my ($result,$message)=open_traffic_log(); if ($result){ # recovery logic goes here.... } # # more code after that... exit(0); sub open_traffic_log() { if (! open("< fwlog.txt")){ return(0,$!); } # Process log file entries here. } #### use CGI; use CGI::Carp qw / fatalsToBrowser /; # not in production! my $cgi= new CGI; # # stuff if ( not $cgi->param('paramIReallyNeed')){ logexeception('paramIReallyNeed was missing from page'); displayExeptionPage($cgi); # Won't return... displayExceptionPage exits. } # more code follows.