- or download this
use Benchmark qw/cmpthese/;
use List::Util qw/reduce/;
...
join '&', kvmap { "$a=$b" } @data;
}
};
- or download this
sub TIESCALAR { bless \my $o => $_[0] }
sub STORE { $_[1] = "Touched by STORE\n" }
...
print $b; # => Untouched by STORE
tied($a)->STORE($b);
print $b; # => Touched by STORE
- or download this
sub walk {
my ( $ref ) = @_;
...
default { carp "I'm confused by $ref" }
}
}
- or download this
{
my ( $test, $modify );
...
}
}
}
- or download this
my ( $gold ) = $data =~ /$rx/
- or download this
qr/(foo).*(foo)(?{ $_ =~ s+foo+bar+g })/
- or download this
use re 'eval';
my $rx = qr/$rx_with_foo(?{ $_ =~ s+foo+bar+g })/
- or download this
{
package A;
...
print $a->legal_keys, "\n";
print $a, "\n";
print Hash::Util::legal_keys($a), "\n";