Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: global symbol...explict package name

by almut (Canon)
on Mar 13, 2008 at 02:00 UTC ( [id://673874]=note: print w/replies, xml ) Need Help??


in reply to global symbol...explict package name

Another thing which is a little strange is your usage of qw() as in

my @array1 = qw($aOrder->{rx_OD_Prism_Diopters} $aOrder->{rx_OD_Prism} $aOrder->{rx_OD_Prism_Angle_Val} $aOrder->{rx_OD_Prism2_Diopters} $aOrder->{rx_OD_Prism2});

This would set up an array with the literal strings '$aOrder->{rx_OD_Prism_Diopters}' etc., which doesn't seem to be what you want, considering how those values in @array1 are being used subsequently...

Replies are listed 'Best First'.
Re^2: global symbol...explict package name
by rightfield (Sexton) on Mar 13, 2008 at 02:58 UTC
    Hi. You are correct, I want the value of $aOrder->{blah} to go into the array, how would I correct that part? Is it strange how the complaints start with $ODP2Dir and $ODP2Val but not several lines above with $ODP1Dir and $ODP1Val? What's with that? Thank you.
      I want the value of $aOrder->{blah} to go into the array, how would I correct that part?

      Just get rid of the qw, and put commas between the expressions, i.e.

      my @array1 = ( $aOrder->{rx_OD_Prism_Diopters}, $aOrder->{rx_OD_Prism}, $aOrder->{rx_OD_Prism_Angle_Val}, $aOrder->{rx_OD_Prism2_Diopters}, $aOrder->{rx_OD_Prism2} );
        Hi, I have made the change. Thank you. I have also review all code blocks to make sure everything grouped properly and all was fine. I can't understand why Perl starts complaining at $ODP2Dir and $ODP2Val but not several lines above where I have $ODP1Dir and $ODP1Val. Thank you for your thoughts.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://673874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2026-04-16 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.