now sure how to handle this, but I do see where system works better and the exec should be at the end. We dont want to load any extra perl modules (not my call)
want to be able to set the value of $psname with the result of
Code:
system("host $ip \| awk \'\{print \$NF\}\'");
I would ask as much however doing all the searching on the net yeilds me nothing, but i did fins a good deal on a pearl handled chainsaw (still wondering how that has anything to do with what i am looking for).
I tried doing $pcname = (system("host $ip \| awk \'\{print \$NF\}\'")); however it still prints the info to the screen and never sets the variable. How do I set the result to the variable??????