Leser: 18
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl -w use strict; use warnings; my $var = ' verwendet werden dürfen.'; if (1==1) { my $var = 'Diese Variable'; print $var; } if (1==1) { my $var = ' soll mehrfach'; print $var; } print $var;
1 2 3 4 5 6 7 8
my $var = 'test'; { my $var = 'hallo'; print "1: $var\n"; } print "2: $var\n";
1 2 3 4 5 6 7 8 9 10 11 12 13 14
use 5.010; sub f { state $i = 0; ++$i; } say f; say f; say f; __END__ 1 2 3