- or download this
#!/usr/bin/perl -w
...
package main;
# terminate("arturo"); # produces an error if you uncomment it
- or download this
#!/usr/bin/perl -w
...
$Robert = "the boss"; # error!
print "\$Robert = $Robert\n";
- or download this
#!/usr/bin/perl -w
...
$main::Robert = "the boss";
print "\$main::Robert = $main::Robert\n";
- or download this
#!/usr/bin/perl -w
...
print "Here at work, 'Robert' is $Robert, but over at the pool hall, '
+Robert'
is $PoolHall::Robert\n";
- or download this
#!/usr/bin/perl -w
...
print "\$foo: $foo\n"; # prints "Hey!" -- the my variable's still in s
+cope
# if we hadn't made that declaration above, this would be an error: th
+e
# interpreter would tell us that Bar::foo has not been defined.
- or download this
#~/usr/bin/perl -w
...
package Movie;
print "Bob => $bob, Carol => $carol\n";
- or download this
#!/usr/bin/perl -w
...
sub showfoo {
return $foo;
}