tags:

views:

47

answers:

1

I am screwing around with a tiny script I am making and one thing I am trying to figure out is how to make a perl variable reflect an executable, for example.

$putty = C:\putty.exe;

When ever I run it like this it tells me "C:\ is not recognizable command, what am I doing wrong? I have also tried surrounding it in quotes and no help by that.

+3  A: 

You should be quoting literal strings, for example like

my $putty = 'C:\putty.exe';

If this is news to you, you might have been missing out on the strict pragma before. I highly recommend having a look at that and using it in all of your code.

rafl
Awesome that worked, now if I can get the thing to diplay the @ when not pretaining to an array and also it wont display IP addresses.
Solignis