programming-examples/perl/Subroutine/Using my.pl
2019-11-15 12:59:38 +01:00

16 lines
272 B
Perl

#!/usr/bin/perl -w
use strict;
my $record;
$record = 4;
print "We're at record ", $record, "\n";
{
my $record;
$record = 7;
print "Inside the block, we're at record ", $record, "\n";
}
print "Outside, we're still at record ", $record, "\n";