[sf-perl] Referencing a variable???

Peter Loo loopeter at yahoo.com
Tue Jul 28 16:09:28 PDT 2009

Hi All,
I have done this once before and can't seem to remember how I did it.
I have 10 program variables namely $parm[1-10].  Then I try to check if they are set using a loop like so:
  for ( my $x = 1; $x <= $maxParm; $x++ ) {
    my $parmName = "parm" . $x;
    if ( $$parmName ) {
      my ($hardValue, $replaceValue) = split(/~!~/, $$parmName);
      $sqlString =~ s/~$hardValue~/$replaceValue/g;
$$parmName has no value.  What am I doing wrong?
Thank you all in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20090728/cdea2af8/attachment.html>

More information about the SanFrancisco-pm mailing list