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.
In reply to Re: How to pass variable to Net::OpenSSH method
by hdb
in thread How to pass variable to Net::OpenSSH method
by urello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |