I'm having a bit of trouble with a perl script, I'm getting command not found errors when trying to define variables:
Code:
#!/usr/bin/perl
# Set behaviour
$workingdir="/home/cisco/bkup";
$snmprw="RW_STRING";
$ipaddress="172.16.1.5";
$days="30";
$rtrlist="$workingdir/RTR_LIST";
$storage="$workingdir/storage";
$latest="$storage/LATEST";
$prev="$storage/PREV";
I get the following errors when exicuting:
Code:
./backup.pl: line 9: =/home/cisco/bkup: No such file or directory
./backup.pl: line 10: =RW_STRING: command not found
./backup.pl: line 11: =172.16.1.5: command not found
./backup.pl: line 12: =30: command not found
./backup.pl: line 15: =/RTR_LIST: No such file or directory
./backup.pl: line 16: =/storage: No such file or directory
./backup.pl: line 17: =/LATEST: No such file or directory
./backup.pl: line 18: =/PREV: No such file or directory
I'm also getting errors about the working directory not existing, but it does:
Code:
[mon01 bkup]# pwd
/home/cisco/bkup
Ideas?