- or download this
>perl -c -we"print $a"
Name "main::a" used only once: possible typo at -e line 1.
- or download this
$Foo::Baar=1;
print "Foo::Bar is enabled" if $Foo::Bar;
- or download this
my $foo = 42;
eval q[$foo++];
- or download this
my($unused, $foo) = func();
- or download this
{ open my $fh, ">$file" or die $! } # touch
- or download this
{
my $lock = lock_something(); # lock released on scope exit
do_stuff_that_needs_the_lock();
}
- or download this
{
my $tree = ...;
my $sentry = Object::Destroyer->new( $tree, 'delete' );
...
}
- or download this
my $object = bless \do {my $var} => $class;