- or download this
use strict;
- or download this
print " ", Hello, ", ", World::ALL, "!\n";
# prints " Hello, World::ALL!"
- or download this
print " ", Hello(), ", ", $World::ALL, "!\n";
- or download this
use Fcntl qw( LOCK_EX LOCK_NB );
flock FILE, LOCK_EX|LOCK_NB or die "File already locked"
- or download this
sub Log {
warn localtime(), ": ", @_, "\n";
}
Log "Ready.";
- or download this
sub Log;
Log "Ready.";
...
warn localtime(), ": ", @_, "\n";
}
- or download this
$o= My::Package->new();
- or download this
$o= My::Package()->new();
- or download this
$o= My::Package::->new();
- or download this
use vars qw( $this $that );
my $varname= @ARGV ? "this" : "that";
${$varname}= "In use"; # This line uses a symbolic reference.