That's what backticks, aka qx, are for.
I've used the absolute path to hostname to remove a possibly insecure dependence on $ENV{PATH}.defined( my $hostname = `/bin/hostname`) or die "No host";
After Compline,
Zaxo
In reply to Re: how to get cmd prompt output
by Zaxo
in thread how to get cmd prompt output
by arunmep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |