Thread FORMAT_TOP (2 answers)
Opened by Wastl at 2014-10-03 15:54

GwenDragon
 2014-10-03 17:22
#177650 #177650
User since
2005-01-17
14563 Artikel
Admin1
[Homepage]
user image
Du musst bei anderen Formate sowohl $^als auch $~ setzen.
http://perldoc.perl.org/perlform.html#Format-Varia...

*_TOP wird nicht automatisch gesetzt, nur weil du das Ausgabe-Format mit $~ neu gesetzt hast.


Teste es mal:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
my $name = "Wastl";

print "\$^: $~ \n";
print "\$^: $^ \n";

$~ = TEST;
#$^ = TEST_TOP;

format TEST =
@<<<<<<<<
$name
.

format TEST_TOP =
Name
.

print "\$^: $~ \n";
print "\$^: $^ \n";

write;

Last edited: 2014-10-03 17:24:45 +0200 (CEST)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread FORMAT_TOP