The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-31-2007
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
incorrect quotes/escaping?

Hi all, i have a perl script. from within the perl script, i am calling a system command which i need to pass in a perl variable. but the variable substitution does not seems to happen. would like to find out where is the missing escape character or extra quotes;or what is my mistake.

Code:
#!/usr/bin/perl -w

$community="public";
$result=system("snmpwalk -v 2c -c $community localhost system");