I was recently confronted by a challenge to write a Perl program that contained the following code:
(YOUR, $hearts) or die;
In the spirit of the "J.A.P.H." programs of old (short for "Just another Perl Hacker", referring to the text printed by the archetypal "J.A.P.H." program), which have been so much a part of Perl's culture for years, I, a trans woman, decided to take on this variation of a Perl challenge with the appended program that I consider to be a "F.Y.H.O.D." in the same spirit.
Granted, the program does not explicitly meet the needs of the challenge since I had set out to use expanded version of the original quote and then found out the prompt was a misquote. Ah, well. I hope the sentiment is appreciated even if it's technically not a "F.Y.H.O.D.".
That said, there is a trivial change that would make it one by the rules of the game, which I happily leave as an exercise for those folks playing around with Perl for the first time...
{
my ($f, $s) = @_;
$f $s;
}
%cut_up_acrostic = (
=> ,
=> , => , => , => ,
=> ,
=> , => , => ,
=> , => , => ,
=> ,
=> , => , => , => ,
=> ,
=> ,
=> , => , => ,
=> ,
=> , => , => , => , => ,
=> ,
=> , );
foreach my $word ( %cut_up_acrostic ) {
my $c = $cut_up_acrostic;
$$word = $c;
}
{
my ($a,) = @_;
$your = $grand . $a;
$a;
}
{
my ($a,) = @_;
$a;
}
{
my ($a, $b) = @_;
$agent = $a;
$the = $had . $used;
}
{
my ($a, $b) = @_;
$are = $a . $b;
$used = $undercover;
}
{
my ($a, $b) = @_;
$became = $a . $b;
$grand = $used . $spoonful;
}
{
my ($a, $b, $c) = @_;
$told = $a . $b;
}
{
my ($a,) = @_;
$a;
}
{
my ($a,) = @_;
$a;
}
{
my ($a,) = @_;
$all = $a;
}
{
my ($a, $b) = @_;
$never = $working;
$on = $boss;
$a . $b;
}
when {
my ($a,) = @_;
$colleagues = $a;
}
{
my ($a, $b) = @_;
$a . $b;
}
{
($had, $b, $c) = @_;
$clown = $had;
$comics = $b;
$to = $c;
$spoonful = $dennis;
$never . $denise;
}
{
my ($a, $b, $c) = @_;
(THEIR, $a) or die ;
$hearts = ;
}
(($were, $denise),
when(($were, $dennis)) and ($was, $your, $boss));
when ($had, ($working, $undercover), ($the, $dea));
($were, ($confused) and ($thing, $sometimes));
($had, ($dirt, $on, ($to, ($the))), ($canyon))
and ($never, $used, ($spoonful));
($were and $are, (($agent)))
and when ($became, $denise);
($told, $all, ($your, $colleagues));
$clown, $comics, $to;
(THEIR, $hearts) or die;