programming-examples/perl/Subroutine/The scope of my variables.pl
2019-11-15 12:59:38 +01:00

12 lines
285 B
Perl

my $name = "Raimo";
print "$name\n";
{
print "My name is $name\n";
my $name = "my name";
print "Now name is $name\n";
my $love = "another name";
print "My love is $love.\n";
}
print "$name is back.\n";
print "$love.\n";