on 3/17/02 6:35 AM, [EMAIL PROTECTED] purportedly said:

> that works, but since i want to build those symbolic
> references dynamically (the reason for the symbolic refs are
> because the camel book suggests those in favour of eval on a
> string) how can i then pre-declare my variables (since i
> don't know their names before the script runs)? is that
> possible (under use strict)?
> 
> 
> my $append = "_name"; # this string could be anything
> my $test = "variable$append";
> $$test = "a string";
> print $variable_name;

IMHO, symbolic refs are syntactic sugar that make code difficult to read,
follow, and debug. I recommend using hashes or objects instead. They are
easier to read, follow, and debug, and are more extensible.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

Reply via email to