Wim,

I can't believe how long it's taken me to figure out what you're on about, and what 
the problem (probably) is. My brain's far too slow to be at work today :)

If cmd came from standard input or something, your script would work. But you're using 
a string to simulate that input, and because it's in double quotes perl is trying to 
interpolate any variables it finds. Like me, it thinks you mean $var1 and $var2 are 
variables. Try escaping them, or single quoting it.
$cmd = 'Display $var1, $var2';
or
$cmd = "Display\$var1, \$var2';

I *think* that's the problem, but the way my brain is today who the hell knows :)

Tristan




You Wrote:
----------

Tristan,

I'm writing a script to send command from a textfile to cisco devices...

I the textfile, I like to have variables, something like

conf t
int $interface
......

when my script reads the line, it should replace $interface by the value 
asked from the value the user enters...
$var{$interface} contains that value...
in the previous mail, $var has nothing to do with perl ;-)

Sorry,
 I wasn't clear (in my head ;-) )

_______________________________________________________
sent via the murky.net webmail hegemony

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to