You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
507 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
my $file_scope = "my value";
print $file_scope, "\n";
sub topsub {
my $top_scope = "visible in 'topsub'";
if (1 > 0.5) {
my $if_scope = "visible inside 'if'";
print "$file_scope, $top_scope, $if_scope \n";
}
bottomsub();
print "$file_scope, $top_scope\n";
}
sub bottomsub {
my $bottom_scope = "visible in 'bottomsub'";
print "$file_scope, $bottom_scope \n";
}
topsub();
print $file_scope, "\n";