Thread Inneres Konstrukt sinnlos? (10 answers)
Opened by Corvin at 2010-03-14 12:52

bianca
 2010-03-14 16:33
#134810 #134810
User since
2009-09-13
7016 Artikel
BenutzerIn

user image
Ich darf auch mal vermuten, dass in dem Script weder use strict; noch use warnings; zum Einsatz kommen.
Und ein  -w am Ende der Shebang-Zeile vollbringt auch schon erhellende Infos.

Dann würdest Du nämlich schon etliches sehen, was nicht passt, was ich an dieser Stelle beim Aufarbeiten von Code GANZ DRINGEND empfehle!

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl -w
use strict;
use warnings;
my @newtokens;
push @newtokens,'foo';
my @tags;
push @tags,'bar';
foreach $token (@newtokens) {
        $token =~ s/\@\@\@\@ ~~~~/ /sig;
        foreach $tag (@tags) {
                $token =~ s/~~~~(\/*.*?)\@\@\@\@/<$1>/sig;
        }
}


Code: (dl )
1
2
3
4
5
Global symbol "$token" requires explicit package name at test14.pl line 8.
Global symbol "$token" requires explicit package name at test14.pl line 9.
Global symbol "$tag" requires explicit package name at test14.pl line 10.
Global symbol "$token" requires explicit package name at test14.pl line 11.
Execution of test14.pl aborted due to compilation errors.
10 print "Hallo"
20 goto 10

View full thread Inneres Konstrukt sinnlos?