in reply to Returning multiple values from subroutine

... you might avoid repeating yourself if the variable name is a clear indicator of what you want by using PadWalker (EDIT: last link should work because it's CORE (!?!), ok use PadWalker). But I consider this much too dark magic.

$ssh->get_user_info($loginid => $locked_status, $expire) ;

( the "=>" is just a cosmetic replacement for ",")

But IMHO the best design is returning a hash (or hashref) and always access the values via the hash:

my %user=$ssh->get_user_info($loginid); print $user{locked_status}; print $user{expire};

In cases you really need these variables so often that typing the hash-syntax bothers you, you can still copy them to scalar variables.

Cheers Rolf