Thread Verstehe Meldung Bareword ... not allowed while strict subs nicht ! (2 answers)
Opened by jan99 at 2013-09-03 13:42

jan99
 2013-09-03 13:42
#169879 #169879
User since
2008-09-18
439 Artikel
BenutzerIn
[default_avatar]
Hi !

ich habe eine Funktion für die Streckenberechnung auf der Erde übernommen und wollte diese in Perl verwenden. Hier mein Source:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
use warnings;
use utf8;
...
use Math::Trig;

sub geo_distance {
my ($l1, $b1, $l2, $b2) = @_ ;

my $rho = 180 / pi;
my $l1_arc = $l1 / $rho;
my $b1_arc = $b1 / $rho;
my $l2_arc = $l2 / $rho;
my $b2_arc = $b2 / $rho;

# nachfolgend ist Zeile 1393
my $e = acos(SIN(b1_arc)*sin(b2_arc) + cos(b1_arc)*cos(b2_arc)*cos(l2_arc-l1_arc));

my $dist = $e * 6378.137;

return ($dist) ;
}


Bekomme bei der Ausführung aber die Meldung:

Quote
Bareword "b1_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Bareword "b2_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Bareword "b1_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Bareword "b2_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Bareword "l2_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Bareword "l1_arc" not allowed while "strict subs" in use at d:\DATEN\Jan\openstreetmap\Updates\RefCo
ntrolling\osmRefControlling2013.pl line 1394.
Execution of d:\DATEN\Jan\openstreetmap\Updates\RefControlling\osmRefControlling2013.pl aborted due
to compilation errors.


Kann mir einer sagen was das bedeutet ?

Gruß Jan :-)

modedit Editiert von GwenDragon: Titel thematisch zugeordnet
Last edited: 2013-09-03 14:12:42 +0200 (CEST)
perl-Greenhorn - Win7 64bit / strawberry (ehem. activeperl) - www.OpenStreetMap.de

View full thread Verstehe Meldung Bareword ... not allowed while strict subs nicht !