in reply to The Name Game and Golf

sorry, i don't read all instructions first time, now my variant:
$_ = $n = $ARGV[0] || 'Micah'; $k = (/^[AEIOUY]/i and $c = substr $n,0,1) || /^[^bfm]/i || ''; $_ = <<SONG; <X>, <X>, bo-b<X-1> Banana-fana fo-f<X-1> Fee-fi-mo-m<X-1> <X>! SONG s/(\w)<X-1>/($k && $1) . $c . substr $n,1/eg; s/<X>/$n/g; print;

Replies are listed 'Best First'.
Re^2: The Name Game and Golf
by ambrus (Abbot) on May 03, 2010 at 16:27 UTC

    No, you have the same bug as the original poster in his first piece of code.