Re: double quotes around a variable

2001-06-08 Thread Karen Cravens
On 7 Jun 2001, at 15:22, Peter Scott wrote: > Ah, another Perl Couple. Congratulations. Right now I am delivering > specifications to my wife for implementation :-) Well, sort of. He's a sysadmin, I'm a programmer. Though he's looking to get back into development, being as how the only sy

Re: double quotes around a variable

2001-06-07 Thread Randal L. Schwartz
> "M" == M W Koskamp <[EMAIL PROTECTED]> writes: M> I dont agree with that. M> Using quotes in print statements is a good habit. It makes code M> more readble, since it is clear that the intention is to print a M> scalar value as a string. M> Without quotes the scalar value could also be a

Re: double quotes around a variable

2001-06-07 Thread Jeff 'japhy' Pinyan
On Jun 7, Karen Cravens said: >On 7 Jun 2001, at 15:16, Jeff 'japhy' Pinyan wrote: > >> They enforce stringification. This can be a problem when printing arrays, >> or sending references to functions: > >'Course, they can be a bennie when printing arrays (of words, >usually), too: > >print @arr

Re: double quotes around a variable

2001-06-07 Thread Brett W. McCoy
On Thu, 7 Jun 2001, Jeff 'japhy' Pinyan wrote: > Well, of course it can be useful. That's why it's there. ;) > > But the problem is that people don't know WHAT stringification is. They > are never told that "@foo" is really join($", @foo), and so they just > assume Perl is going to do what they

Re: double quotes around a variable

2001-06-07 Thread Karen Cravens
On 7 Jun 2001, at 17:10, Jeff 'japhy' Pinyan wrote: > But the problem is that people don't know WHAT stringification is. They > are never told that "@foo" is really join($", @foo), and so they just > assume Perl is going to do what they mean, when Perl is really doing what > is documented. Well

RE: double quotes around a variable

2001-06-07 Thread Travis Smith
Either you or I (or maybe both us) have a really dirty mind. Isn't that like: (true != 0) You know, there's no and/or operator. In ksh you do have the |& - but that's something different. Completely useless, but I want a and/or operator. ~Travis Smith Systems Admin finger sage at post891 d

Re: double quotes around a variable

2001-06-07 Thread Brett W. McCoy
On Thu, 7 Jun 2001, M.W. Koskamp wrote: > > 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 we

Re: double quotes around a variable

2001-06-07 Thread Chas Owens
> > Ah, another Perl Couple. Congratulations. Right now I am delivering > specifications to my wife for implementation :-) Either you or I (or maybe both us) have a really dirty mind. -- Today is Pungenday, the 12nd day of Confusion in the YOLD 3167 Grudnuk demand sustenance!

Re: double quotes around a variable

2001-06-07 Thread Jeff 'japhy' Pinyan
On Jun 7, Peter Scott said: >At 05:03 PM 6/7/01 -0500, Karen Cravens wrote: >>I always figured print "@foo" was going to print >>the array reference, and never used it, until one day I was >>"correcting" my husband while reading over his shoulder after he'd >>asked for help debugging, and he told

Re: double quotes around a variable

2001-06-07 Thread Karen Cravens
On 7 Jun 2001, at 15:16, Jeff 'japhy' Pinyan wrote: > They enforce stringification. This can be a problem when printing arrays, > or sending references to functions: 'Course, they can be a bennie when printing arrays (of words, usually), too: print @array; # why's it all smooshed together? p

Re: double quotes around a variable

2001-06-07 Thread Peter Scott
At 05:03 PM 6/7/01 -0500, Karen Cravens wrote: >I always figured print "@foo" was going to print >the array reference, and never used it, until one day I was >"correcting" my husband while reading over his shoulder after he'd >asked for help debugging, and he told me what a doofus I was. >(Well, h

[OT]RE: double quotes around a variable

2001-06-07 Thread Chas Owens
Actually you already have an and/or operator (or). The English equivilent for "or" in perl is "xor". Examine: Take this or that (NB this implies you cannot take both, but you must take one). take table (instead of truth table) left left = not allowed (false) left took = allowed (true) took left

Re: double quotes around a variable

2001-06-07 Thread Peter Scott
At 10:22 PM 6/7/01 +0200, M.W. Koskamp wrote: >- 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

Re: double quotes around a variable

2001-06-07 Thread M.W. Koskamp
- 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 $inp

Re: double quotes around a variable

2001-06-07 Thread Peter Scott
At 03:53 PM 6/7/01 -0400, Pete Emerson wrote: >Respectfully, I disagree with this: > >Peter Scott wrote: > > > 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 i

Re: double quotes around a variable

2001-06-07 Thread Pete Emerson
Respectfully, I disagree with this: Peter Scott wrote: > 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 t

Re: double quotes around a variable

2001-06-07 Thread Jeff 'japhy' Pinyan
On Jun 7, Byron Rendar said: >my $input= ; > my $username = chop( $input ); >print "$username"; > >Why are double quotes around $username a "bad" thing in the print statement? They enforce stringification. This can be a problem when printing arrays, or sending references to functions: @

Re: double quotes around a variable

2001-06-07 Thread Brett W. McCoy
On Thu, 7 Jun 2001, Byron Rendar wrote: > my $input= ; > my $username = chop( $input ); > print "$username"; > > Why are double quotes around $username a "bad" thing in the print statement? Who said they are? In your example the double quotes aren't necessary, but they are required if you

Re: double quotes around a variable

2001-06-07 Thread Peter Scott
At 09:50 AM 6/7/01 -0700, Byron Rendar wrote: >my $input= ; > 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

RE: double quotes around a variable

2001-06-07 Thread Peter Cornelius
> print "$username"; > > Why are double quotes around $username a "bad" thing in the > print statement? They are? I do print "your username is $username\n"; all the time. I know that doesn't mean it's right but I've never had a problem with it. If all you're printing in print "$username"; th

double quotes around a variable

2001-06-07 Thread Byron Rendar
my $input= ; my $username = chop( $input ); print "$username"; Why are double quotes around $username a "bad" thing in the print statement? Byron Rendar [EMAIL PROTECTED] (503) 533-2792(w) (503) 533-2999(fax) Portland Community College