So, I’m wondering how to pass parameters to a perl script from a .bat file in windows. I’m running active perl. If you’re wondering why, I’m automating log indexing for awstats+iis.
I can do this fine just typing the command directly:
awstats.pl -config:blahblah.com -update
I tried putting that in my batch file directly. I also tried using the standard batch file way:
awstats.pl /config:blahblah.com /update
I even tried this, thinking the dash was parsed differently by perl:
awstats.pl /-config:blahblah.com /-update
So I thought I’d try escaping the dash (for fun, of course):
awstats.pl /%-config:blahblah.com /%-update
Then I tried the above combinations, attempting to escape the colon:
awstats.pl /config%:blahblah.com /update
None of these produced the success screen I get when typing in the command. Yes, I had a pause so I could verify…
Any thoughts? Is there something obvious I’m missing about parameters?
The problem was in batch file speak, the colon becomes an equals.
That is odd though because the command line accepts a colon for params. Maybe it is magically ignored in batch files or something.