Sorry this is the working script. That one does not work.
#!/usr/local/bin/perl
#opening narr files
use warnings;
use strict;
use Math::Trig;
use DBI;
my ($id, $variance_speed, $variance_angle, $stnd_dev, @x, @y, $date, $hour, $dbh, $sth, $x, $y, $lat, $longi, $theta, $rho, $R, $pi, $rads...