Which scripting language

Over the years we have used perl, batch, vbscript, in built services written in whatever and quite a few others languages for running automated tasks on our servers. To be honest it’s a touch difficult remembering the nuances of the various languages and since we have now got command line php running I was wondering if there are any downsides to using php for these tasks. Since we use php on a daily basis for our web sites (therefore lot’s of inhouse experience) it would seem a sensible bet.

Any thoughts on this (or should we look at powershell instead)?

Comments please.

if you’re using windows servers yes, powershell is the way to go.

I know both Perl and PHP
Both have their strong sides and down sides…

for what you want to do, I would advice Perl :slight_smile:

PHP is known by many for its ability to produce web pages etc with simple code, as well as its ability to produce pages using much more advanced code, depending on requirements.

However, just because you know the syntax of PHP doesn’t mean it’s going to be easy to get used to using it for automated server scripts. Unless you’ve used it for similar tasks enough beforehand you’ll find yourself constantly at manuals and tutorials, especially when it comes to utilising executables etc.

I’d go for something built for that kind of thing. Perl is a good bet, as is Python. It depends what kind of servers you’ll be using too.