vbscript or perl

D

David

Dear all,

I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before. Should I

(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the script in
perl (which I am familiar with).

The script in question most does database stuff e.g. calls stored procs,
parses text files then loads new records with bcp.

Cheers,

David
 
A

Alan Mead

I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before. Should I

(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the script in
perl (which I am familiar with).

The script in question most does database stuff e.g. calls stored procs,
parses text files then loads new records with bcp.

David,

I think clearly vbscript would be the way to go. Microsoft has spent a
lot of money on research that shows that all their products beat
everything else. Besides, who's ever heard of someone using Perl for
goofy stuff like processing text or accessing databases!? I don't think
it does that...

It's really a no-brainer. I'm kind of embarassed that you asked at all.

Have fun learning vbscript.

-Alan
 
P

Philipp Pagel

David said:
I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before. Should I
(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the script in
perl (which I am familiar with).

How about
(c) install cygwin to have bash/tcsh or whatever shell the original
scripts were using and don't port to a new language at all.

cu
Philipp
 
J

Jürgen Exner

David said:
I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before.
Should I

(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the
script in perl (which I am familiar with).

You are kind of comparing model cars and real airplanes. To me that doesn't
make much sense.

I hope you are aware that VB Script is a client-side scripting language
which is executed as part of DHTML in a particular web browser while Perl is
general purpose programming language and has nothing to do with DHTML (you
need PerlScript for that)?

jue
 
J

James Willmore

I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before. Should I

(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the script in
perl (which I am familiar with).

The script in question most does database stuff e.g. calls stored procs,
parses text files then loads new records with bcp.

The real question is .... which do you know better. If you can honestly
answer that question, then you'll already have an answer :)

HTH

Jim
 
R

Robert

Alan Mead said:
David,

I think clearly vbscript would be the way to go. Microsoft has spent a
lot of money on research that shows that all their products beat
everything else. Besides, who's ever heard of someone using Perl for
goofy stuff like processing text or accessing databases!? I don't think
it does that...

It's really a no-brainer. I'm kind of embarassed that you asked at all.

Have fun learning vbscript.

-Alan

SARCASM ALERT!!!!

:)

Robert
 
B

Ben Morrow

Quoth "Jürgen Exner said:
You are kind of comparing model cars and real airplanes. To me that doesn't
make much sense.

I hope you are aware that VB Script is a client-side scripting language
which is executed as part of DHTML in a particular web browser while Perl is
general purpose programming language and has nothing to do with DHTML (you
need PerlScript for that)?

This isn't true. Microsoft have a tool called Windows Script Host, that
allows VB- (and Java-) scripts to run independently of any browser, or
anything like that. It is the official M$-recommended way of scripting
windows (they've finally admitted .bat files are useless).

To the OP: AS Perl is straightforward to install, and provided your
program's written cleanly (i.e. uses standard modules for stuff rather
than roll-your-own) I would expect relatively little trouble porting it.

Ben
 
V

VBSome

The real question is .... which do you know better. If you can honestly
answer that question, then you'll already have an answer :)

GOOD ANSWER!
This isn't true. Microsoft have a tool called Windows Script Host, that
allows VB- (and Java-) scripts to run independently of any browser, or
anything like that. It is the official M$-recommended way of scripting
windows (they've finally admitted .bat files are useless).

YUP! VBScript can run independant of any browser. That is why scripts (read
virus) written in VBS are so dangerous.

Perl is really easy to install on Win32 machines so if you already know
Perl, have at it. If you don't know Perl, and have little experience with
VBS then the latter might be easier to learn. Just remember that VBS is just
a subset of the "real" language (VB) so you might get stuck.

I am a VB programmer (sure go ahead and laugh) and do most applications in
VB but when I need a good scripting language I go for Perl, because,
although not as easy, I can get things done quicker in Perl.
 
J

Josef Moellers

VBSome said:
Perl is really easy to install on Win32 machines so if you already know
Perl, have at it. If you don't know Perl, and have little experience with
VBS then the latter might be easier to learn. Just remember that VBS isjust
a subset of the "real" language (VB) so you might get stuck.

Also, if you ever want your script to run on anything but Windows, you
might get stuck if you used VBScript.
Perl is pretty wide spread.
 
C

Chris Barts

David said:
Dear all,

I have to port a moderately complicated unix shell script written for
Solaris to Windows. I've never done Windows scripting before. Should I

(a) learn VBScript and implement it in that;
(b) install Active Perl on the target Windows box and rewrite the script in
perl (which I am familiar with).

If you know Perl, write it in Perl. That much is a no-brainer. Trying to
learn a new language by porting a real program to it is usually not a
good way to write clean, maintainable code.

Installing Active Perl is trivial compared to learning a new language,
in both time and effort.
The script in question most does database stuff e.g. calls stored procs,
parses text files then loads new records with bcp.

In that case, Perl is the best way to go. Search through CPAN to find a
couple modules to help with the database and text processing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top