- or download this
#!/usr/bin/perl
use strict;
...
print "** $title:\n";
print "$html\n";
- or download this
#!/usr/bin/perl
use warnings;
...
my $rainaverage = @data ? ($raintotal / @data) : undef;
print "$region: $rainaverage\n";
}
- or download this
#!/usr/bin/perl
use warnings;
...
);
print $_->as_trimmed_text,"\n" for @cells;
- or download this
PENINSULA
GULF COUNTRY
...
WIDE BAY and BURNETT
SOUTHEAST COAST
CORAL SEA
- or download this
# All directories in our parent's path
%dirs = map { /^.*\/(.*)/ => $_ } grep {-d} glob "../*";
- or download this
# De-crapper (for use after Word HTML idiocy)
my $file = join '',<>;
...
$file =~ s/<\/?span.*?>//gms;
print $file;
- or download this
# Password generator
my @chars = ('.','!','#','@','$','/',0..9,'A'..'Z','a'..'z');
my $length = 8 + rand 4;
my $pw = join '', @chars[ map { rand @chars } (1..$length)];
- or download this
# Java namestyle to SQL namestyle regex
s/(?<!^)([A-Z]+)/_\L$1\E/g;
- or download this
# Environment dumper
while (my @set = each %ENV) {printf "%s=>%s\n",@set}