Lee Goddard wrote:
> I have defined sub a1, sub a2, and sub a3.
> I need to push to an array references to these.
> Is there a way I can do this programmatically?
> 
> Sortalike...
> 
>  for (1..3){
>     push @myarray, \&a$_;
>  } 
> 
> ...but correct?

    for my $ref (\&a1, \&a2, \&a3) {
        push @myarray, $ref;
    }

Symbolic references are ick. Avoid. They often indicate a problem in your
design.

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to