Reputation: 2675
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.
Upvotes: 0
Views: 1447
Reputation: 12341
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.
Upvotes: 3