Thread Variable _ ? (52 answers)
Opened by bianca at 2020-12-25 10:24

bianca
 2020-12-27 10:05
#193046 #193046
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
2020-12-26T22:56:18 haj
Interessant wäre die Stellen, bevor und nachdem Du Archive::Zip einbindest.


Code (perl): (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;

say "vorher: '"._."'";
require Archive::Zip;
say "nachher: '"._."'";
Quote
Bareword "_" not allowed while "strict subs" in use at test.pl line 6.
Bareword "_" not allowed while "strict subs" in use at test.pl line 8.
Execution of test.pl aborted due to compilation errors.


Code (perl): (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;

say "vorher: '"._."'";
use Archive::Zip;
say "nachher: '"._."'";
Quote
Bareword "_" not allowed while "strict subs" in use at test.pl line 6.
BEGIN not safe after errors--compilation aborted at test.pl line 7.
Also ist use auch keine Lösung.

Ist das Verhalten bei dir/euch anders?
Gibt es denn für CPAN:strict einen Schalter, der genau diese Meldung unterdrückt? Würde das Programm ohne die Abbruchmeldung so arbeiten als wäre mit _ alles gut? Ist das vielleicht nur eine "falsche" Meldung? Wie könnte man denn testen, ob es ohne Meldung "korrekt" arbeiten würde? Wenn der Cache leer ist, veranlasst _ dann zu einem stat() oder was anderes oder gar nichts?
10 print "Hallo"
20 goto 10

View full thread Variable _ ?