Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing unix commands from a Perl file

Status
Not open for further replies.

carlosAlberto

IS-IT--Management
Oct 9, 2001
109
0
0
GB
Hello,

I would like to execute the following unix command from my Perl file:

snmpwalk -v 3 -u testUser -l noAuthNoPriv $ipAddress $miboid

and then display the result to the screen.

How is is possible to execute this command and display the result???????????????

All help greatly appreciated.


Regards,
Carl.
 
So are you getting nothing out of the pipe or is it not even opening? Dying and printing $! can help diagnoses problems like these. I don't know if you've done this already or if it's been mentioned earlier, but I didn't see it.
Code:
open (RESULTS, $snmpCommand) or die "Error: $!";
----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top