- or download this
my $eol = qr/\015|\012|\015\012/;
- or download this
$hash{
$something + $long / $and * $hairy
} = $foo;
- or download this
if ( /blah (foo) gibber/ )
{
$var =~ s/\Q$1\E/bar/g;
}
- or download this
if ( /blah (foo) gibber/ )
{
my $thingy = $1;
$var =~ s/\Q$thingy\E/bar/g;
}
- or download this
$file =~ s/<<(\w+);.*\n\1\n//sg;
- or download this
print <<EOT;
this is short.
...
print <<EOT;
this is also short;
EOT
- or download this
$file =~ s/[;\n]\s*#[^\n]*//sg; # Delete comments
- or download this
print "foo; #bar";
- or download this
print <<HTML, $end_of_stream;
...
...
HTML
- or download this
print <<P1, <<P2;
...
...
...
...
P2
- or download this
sub twiddle ( $ )
{
my ( $arg ) = @_;
...
}
- or download this
LOOP:
for ( my $I = do { ... }; $i < 20; ++$i ) { ... }
- or download this
#!/usr/bin/perl
...
my $hash_display = join '', unique_elements @hash_disp;
eval $hash_display;
}