in reply to Re: Adding '#' in the beginning of each line
in thread Adding '#' in the beginning of each line

davorg++

Concerning the usage of $", one could augment your solution by doing

my @file = <>; $" = '#'; print "#@file"; # ^^^
but that just adds obscurity to an already obscure solution. So I agree with your assessment of the homework-giver.

On a funny sidenote, something like the following also uses $" :)

$" = '#'; print $", $_ while <>;

-- Hofmator