At 09:50 AM 6/7/01 -0700, Byron Rendar wrote:
>my $input = <STDIN>;
> my $username = chop( $input );
>print "$username";
>
>Why are double quotes around $username a "bad" thing in the print statement?
They're bad mainly because they suggest that the author doesn't understand
Perl well. So if I see code like that, my spidey sense starts tingling and
I wonder how good the code is. Why would someone type unnecessary quotes
unless they were confusing Perl with the Bourne shell, in which case they
may well have made some real mistakes?
Some people may point out how the quoted form can actually produce a
different result, but that's only through overloading (you don't want to go
there yet, trust me). The real danger is in what I said in the previous
paragraph.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com