I have a program that I am working on improveing. The fist step I have taken is converting it in using the strict pragma.
Now when this subroutine call is made I get the following compilation error: Global symbol "$cell" requires explicit package name at ./evdo.pl line 279. Global symbol "$cell" requires explicit package name at ./evdo.pl line 279. I understand lexical scope, but am having a hard time figuring out how to fix this. Any help is greatly apprciated. Chris sub getMarket { my $_cell = shift; my $_mkt = ""; my $mkt = ""; foreach $mkt (keys %marketInfo) { my $start = $marketInfo{$mkt}->{"start"}; my $end = $marketInfo{$mkt}->{"end"}; if( $cell >= $start && $cell <= $end) { $_mkt = $mkt; last; } } return $_mkt; } This is the foreach loop that calls the subroutine foreach my $c_s (sort num keys %evdo) { my $market = $c_s; my $satt = $evdo{$market}{$pegs[0]}; my $sest = $evdo{$market}{$pegs[1]}; my $fit = $evdo{$market}{$pegs[2]}; my $psEst = $evdo{$market}{$pegs[3]}; my $catt = $evdo{$market}{$pegs[4]}; my $cest = $evdo{$market}{$pegs[5]}; my $pcEst = $evdo{$market}{$pegs[6]}; my $rfLost = $evdo{$market}{$pegs[7]}; my $cpDropCell = $evdo{$market}{$pegs[8]}; my $cpDropRnc = $evdo{$market}{$pegs[9]}; my $tuneAway = $evdo{$market}{$pegs[10]}; my $tDrops = $evdo{$market}{$pegs[11]}; my $pDcr = $evdo{$market}{$pegs[12]}; my $ia = $evdo{$market}{$pegs[13]}; my $pIa = $evdo{$market}{$pegs[14]}; my $tccf = $evdo{$market}{$pegs[15]}; my $failAp = $evdo{$market}{$pegs[16]}; my $failTp = $evdo{$market}{$pegs[17]}; my $failA10 = $evdo{$market}{$pegs[18]}; my $failAAA = $evdo{$market}{$pegs[19]}; my $failPDSN = $evdo{$market}{$pegs[20]}; my $cell = substr($market,0,index($market,"_")); my $mkt = &getMarket($cell); }