Thread use strict funktioniert nicht bei folgendem Programm (16 answers)
Opened by Byonik at 2011-01-05 18:03

Taulmarill
 2011-01-06 11:30
#144119 #144119
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
Bei mir kommt da auch keine Warnung sondern ein richtiger Fehler. Zumindest, wenn ich die Definition der Subroutine unter den Aufruf setzte, etwa so:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env perl

use strict;
use warnings;

testemaldiesub;

sub testemaldiesub {
    print "Hallo Welt\n";
}

Dann bricht das Programm folgendermaßen ab:
Code: (dl )
1
2
Bareword "testemaldiesub" not allowed while "strict subs" in use at test.pl line 6.
Execution of test.pl aborted due to compilation errors.


Ich teste auf Perl v5.10.0 built for i486-linux-gnu-thread-multi, glaube aber nicht, dass das wirklich was mit der Version zu tun hat.
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread use strict funktioniert nicht bei folgendem Programm