On Mon, 10 Jul 2006, Geetha Weerasooriya wrote:
>  
> In my perl code for MapMatching, I have following while loop. When I run
> the program I get the following two error messages(for each data line in
> the data file)
> But the out put file is created.
>  
> Use of uninitialized value in int at filename.pl lineNo, <DATA> line ..
> Use of unititialized value in multiplication(*) at filename.pl lineNo,
> <DATA> line ..


You don't show the data under __DATA__ but I suspect that you will find
that the program is reading a blank line.

Put your program in a text editor, go to the bottom of the file and
backspace to the last character in data, then save it

I think they are warnings and more annoying than anything else



>  
> The errors refer to the lines  in bold in the code


Can't read bold in Pine!  



> Can you please  teach me where the error is?
>  



>  
>  
> while(<DATA>)  {
>             chop;

try chomp; there


>             s/\s//g;
>  
> /\d+\/\d+\/\d+,\d+:\d+:\d+,\d+,(\d+\.*\d*),(\d+\.*\d*),\d+,\d+,\d+,\d+\.
> *\d*,\d+$/
>                         or die "Error in mtchSq2Route.pl! bad format in
> SQ record.\n$_\n";
>             $lngi_bgn = $1;
>             $lati_bgn = $2;
>                        
>              my ($rt1,$dist1,$pos1) = &getFootPointDistToRoot($lngi_bgn,
> $lati_bgn);
>                         
>              $pos1 = int($pos1);
>              $dist1 = int($dist1*100)/100;
>               
>             print "$_,$rt1->{ID},$pos1,$dist1\n";
>  
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to