in reply to Re: Adding '#' in the beginning of each line
in thread Adding '#' in the beginning of each line
Concerning the usage of $", one could augment your solution by doing
but that just adds obscurity to an already obscure solution. So I agree with your assessment of the homework-giver.my @file = <>; $" = '#'; print "#@file"; # ^^^
On a funny sidenote, something like the following also uses $" :)
$" = '#'; print $", $_ while <>;
-- Hofmator
|
---|