#!/usr/bin/perl
#shuffle your JAPH like cards ;-)
print "Just another JAPH\n";
#You have a deck of JAPH
$JAPH = "Just Another Perl Hacker";
#Show everyone that deck
print $JAPH, "\n";
#Deal it all out, and stack it all back up
while($JAPH)
{
$HPAJ = $HPAJ . chop $JAPH;
}
#Show the reversed stack
print $HPAJ, "\n";
#Deal it out to 4 people
while($HPAJ)
{
$J = $J . chop $HPAJ;
$A = $A . chop $HPAJ;
$P = $P . chop $HPAJ;
$H = $H . chop $HPAJ;
}
#Show everybody's hands
print $J, "\n";
print $A, "\n";
print $P, "\n";
print $H, "\n";
#Shuffle them back together
while ($J)
{
$JP = (chop $J) . (chop $P) . $JP;
$AH = (chop $A) . (chop $H) . $AH;
}
#Show the decks
print $JP, "\n";
print $AH, "\n";
#Shuffle these decks back together
while ($JP)
{
$JAPH = (chop $JP) . (chop $AH) . $JAPH;
}
#Show the deck
print $JAPH, "\n";
Just Another Perl Hacker