I have this line in my perl script :
"$retrieveIps --fields FileserverIPS WHERE Fileserver LIKE '%NET%' | tr \"
\" \"\n\" | xargs -n1 host";
This part of the line above :
$retrieveIps --fields FileserverIPS WHERE Fileserver LIKE '%NET%'
Should give me this output :
NodeName1.comp.com NodeName2.comp.com
And I want to avoid using shell commands in my script as much as possible. I was wondering if there is any way to do the 'tr' , 'xargs' and 'host' command in perl? I tried to look on the internet but couldn't find anything helpful for me.
This is the required output :
10.0.0.1
10.0.0.2