----- Original Message -----
From: Peter Scott <[EMAIL PROTECTED]>
To: Byron Rendar <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 9:11 PM
Subject: Re: double quotes around a variable
> 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?
I dont agree with that.
Using quotes in print statements is a good habit. It makes code more
readble, since it is clear that the intention is to print a scalar value as
a string.
Without quotes the scalar value could also be a FileHandle instance or a
subroutine reference.
So i think proper quoting is not making your code bad.
Maarten.