$_ = 'SPACE'; while ($_) { $n .= substr $_, 0, 1, ''; print "$_$n\n"; }