in reply to Taking individual values from return of a function

I want to take only $sla_red and $sla_green each time the function calls...

my $href = function_call(); my( $red, $green ) = map { $href->{$_}{sla} } qw( red green );

...in another cgi file.

That last part is too vague. Please clarify.


Dave

Replies are listed 'Best First'.
Re^2: Taking individual values from return of a function
by gayu_justin (Novice) on Dec 10, 2013 at 08:38 UTC

    The function is written in one file and i want the variables in another file.

      ... i want the variables in another file.

      That's still too vague for me to understand. Do you mean "I want the values of the variables to be written to another file", or "I want to access those variables from a part of my program contained in another file", or ...?