programming-examples/perl/Class/A class is really just a package.pl

9 lines
139 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/bin/perl
package main;
$name = "Tom";
my $birthyear = 1942;
package nosy;
print "$main::name.\n";
print "$main::birthyear?\n";