Wilson, Douglas on 15 Oct 2003 18:12:10 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: Solution to Quick easy question



From: Hans Dieter Pearcey [mailto:hdp@pobox.com]

On Wed, Oct 15, 2003 at 03:01:20PM -0700, James wrote:
>> 
>> Thanks Doug, your email put me in the right direction.
>>  Here is the *new* and improved printf:
>> 
>> printf ("%-15s          %-15s          %-30s\n",
>> ${"DCS\_DB$i"}, ${"DB$i\_NM"}, ${"DB$i\_DIR"});

If I'd known I was helping with symbolic references, I
would've done something different. I thought I was looking
at hash arrays in the original post. Don't do this. Do use
strict and figure out how to make it work under strict.
Use arrays, or hash arrays or something, but don't use
a variable as a variable name. Do read the link at the
bottom that Hans provided.
 
>> Now it works.  I am still a little confused on when to
>> use double quotes, single quotes and the curley
>> braces.  

> Someone has to say it, so I'll let it be Mr. Dominus:

> Why it's stupid to `use a variable as a variable name'
> http://perl.plover.com/varvarname.html
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**