Jeff 'japhy' Pinyan wrote:
> On Jun 27, Wagner, David --- Senior Programmer Analyst --- WGO said:
> 
>> Sorry, but I have two subroutines with the same name which is fine
>> because I have not had a need to use the hashes which these two
>> similar subroutines created. 
>> 
>> How do I run the subroutine and generate my set of hashes, then
>> replace the sub with the other and run again, but into different
>> hashes. 
> 
> Is the problem that foo1() and foo2() *populate* a hash of a specific
> name?  Like this:
> 
>    sub foo1 {
>      %something = (...);
>    }
> 
>    sub foo2{
>      %something = (...);
>    }
> 
> If that's the case, you could do:
> 
>    foo1();
>    my %copy = %something;
>    foo2();
> 
> Now you have %copy and %something.  Is that the situation?

        No, they are passed references. I received an earlier email saying to 
do run 1 and the do a require and then I can run with the second one.

        Thanks for the input though.

Wags ;


*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


  • RE: Run a subroutine, ... Wagner, David --- Senior Programmer Analyst --- WGO

Reply via email to