On Wednesday 25 July 2001 10:26, Diego Riaņo wrote:
> I want to retrieve the name of one of the original arrays, for example
> retrieve:
>
> @NumericalResults
> to use it in another function.

Hmmm, I'm not sure what you're getting at here.  You've create a hash or 
arrays, why not just pass a reference to the proper has element?  Here's an 
example:

#!/usr/bin/perl

use warnings;
use strict;

my @NumericResult       = qw( 10 20 100.01 .001 );
my @general             = qw( cool array here );

my %MyHash = ( NumericResult    => \@NumericResult,
                 general                => \@general
                  );
                          
foreach my $key ( keys %MyHash ){
        print_array( $key, $MyHash{$key} );
}

sub print_array{
        my ( $key, $array_ref ) = @_;
        
        print $key, ": ";
        foreach ( @$array_ref ){
                print $_, ", ";
        }
        print "\n";
}

Since you've given the keys in the hash the same names as the arrays, you can 
use those keys to access the array contents.  

If I've misunderstood the question, please give some more detail.

Regards,

Troy Denkinger


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to