Graeme06
Technical User
- Jun 6, 2006
- 60
Hi:
I'm new to Perl and I'm using the command:
system('/usr/sbin/ping '.$servername)
where $servername is the name of what I'm trying to ping.
It works fine, but the output goes to the screen, and I want it to go to a a varialbe $result. I can put:
$result = system('/usr/sbin/ping '.$servername)
but that just gives the return code of ping and not the actual output.
Any ideas?
Thanks,
Graeme
I'm new to Perl and I'm using the command:
system('/usr/sbin/ping '.$servername)
where $servername is the name of what I'm trying to ping.
It works fine, but the output goes to the screen, and I want it to go to a a varialbe $result. I can put:
$result = system('/usr/sbin/ping '.$servername)
but that just gives the return code of ping and not the actual output.
Any ideas?
Thanks,
Graeme