Perl

There's not enough fresh Perl content on the web. This is my corner for it - snippets, resources, and longer posts about patterns I use and things I find interesting.

Some posts are co-authored with an AI assistant (Claude by Anthropic). The model version is listed in the author line of each article. Code examples referencing CPAN modules are quoted for commentary under their respective licenses.

Snippets

japh.pl

#!/usr/bin/env perl

use Time::HiRes qw(usleep);

$| = 1;
my @p = ('a'..'z', 'A'..'Z', 0..9);
my @t = split //, 'japh';
my @o;
{
  @o = map { ($o[$_] // '') eq $t[$_] ? $t[$_] : $p[rand @p] } 0..3;
  print @o, "\r";
  usleep 25_000;
  redo unless "@o" eq "@t";
}
print "\n";

Posts

Resources