in reply to How to pass variable to Net::OpenSSH method
my @domains = $ssh2->capture("grep $tempo /etc/userdomains|cut -d: -f1"); #THIS IS NOT WORKING SINCE $TEMPO IS NOT DEFINED IN SHELL
The comment is misleading as $tempo will already be substituted by Perl with each element of @usernames in turn. The shell will never be asked for a variable $tempo.
You might want to inspect @usernames to see what you got from the first capture command.
|
|---|