On Thu, 7 Jun 2001, 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? Who said they are? In your example the double quotes aren't necessary, but they are required if you want to be able to interpolate that variable in a more complex string: print "User name = $username\n"; Of course you could also do print "User name = ", $username, "\n"; or print "User name = " . $username . "\n"; I'm lazy and hate typing all of those commas and dots. :-) -- Brett Brett W. McCoy Software Engineer Broadsoft, Inc. 240-364-5225 [EMAIL PROTECTED]
- double quotes around a variable Byron Rendar
- Re: double quotes around a variable Peter Scott
- Re: double quotes around a variable Pete Emerson
- Re: double quotes around a variable Peter Scott
- Pel.org Page Works
- Re: double quotes around a variable M.W. Koskamp
- Re: double quotes around a variable Peter Scott
- Re: double quotes around a variable Brett W. McCoy
- Re: double quotes around a variable Randal L. Schwartz
- Re: double quotes around a variable Brett W. McCoy
- Re: double quotes around a variable Jeff 'japhy' Pinyan
- Re: double quotes around a variable Karen Cravens
- Re: double quotes around a variable Jeff 'japhy' Pinyan
- Re: double quotes around a variable Karen Cravens
- Re: double quotes around a varia... Peter Scott
- Re: double quotes around a v... Jeff 'japhy' Pinyan
- Re: double quotes around a v... Chas Owens
- RE: double quotes around... Travis Smith
- [OT]RE: double quotes ar... Chas Owens
- [OT] and/or operator Michael Fowler