#!/usr/bin/perl
($recipe = << 'DISH') =~ s/^\s+//gm;
Preheat oven to 43 deg. fahrenheit.
Mix 1ml. dilithium with 3 oz. Nacl and
stir in 4 anchovies. Glaze with 1 g.
mercury. Heat for 4 hours and let cool
for 3 seconds. Serves 10 aliens.
DISH
pos ($recipe) = 0;
while ($recipe =~ /(\d+) /g) {
my $amount = $1;
if ($rezipe =~ / \G (\w{0,3})\.\s+(\w+)/x) {
print "$amount $1 of $2\n";
} else {
$recipe =~ / \G (\w+) /x;
print "$amount $1\n";
}
}