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

Re^2: variable in variables

by ohgary (Initiate)
on Apr 25, 2013 at 20:41 UTC ( #1030731=note: print w/replies, xml ) Need Help??


in reply to Re: variable in variables
in thread variable in variables

Ok, that handles an initialization of the worksheet, but how do I do the worksheets writes outside of a for loop?
An adhoc write to another element?

As my example, How do I assign a "person" and then be able to do my write as my example showed?
 

Replies are listed 'Best First'.
Re^3: variable in variables
by eyepopslikeamosquito (Chancellor) on Apr 25, 2013 at 20:52 UTC

    how do I do the worksheets writes outside of a for loop?
    Old:
    $NAME = "BOB"; $worksheet_$NAME->write('A2', "$NAME is here");
    New:
    $NAME = "BOB"; $worksheets{$NAME}->write('A2', "$NAME is here");

    BTW, as for why symbolic references should be avoided, see the classic three part series by MJD: part 1 and part 2 and part 3.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030731]
help
Chatterbox?
[Lady_Aleena]: Corion, it was PerlMonks who kept pushing me to get Linux, so now I know some of the commands to use in word play.
[Corion]: Lady_Aleena: :-D
[Lady_Aleena]: Corion, so do you think the gods would be open to taking over Cookies should I disappear for too long a time?
[Corion]: Lady_Aleena: Yes, I think so, but maybe someone else might also take care of the cookies ;)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-04-26 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (471 votes). Check out past polls.