Thread Vordefinierte Variablen anzeigen (52 answers)
Opened by bianca at 2010-02-07 13:20

bianca
 2014-10-18 17:02
#177891 #177891
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Das gesamte Script sieht im Moment so aus:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use strict;
use warnings;
use 5.10.0;

for my $var (sort {lc $a cmp lc $b} keys %main::) {
    my $glob = $main::{$var};
    if (ref \$glob ne 'GLOB') {
        my $ref = ref \$glob;
        say "$glob: ref=$ref";
        say "$var: $glob: ref=$ref";
        if (ref \$GLOB eq "SCALAR") { say $$glob }
    }
}

Und gibt aus:
Quote
Global symbol "$GLOB" requires explicit package name at test_perlvars.pl line 12.
Execution of test_perlvars.pl aborted due to compilation errors.
10 print "Hallo"
20 goto 10

View full thread Vordefinierte Variablen anzeigen