Claudio said:
Said in another way, I would like to write Perl programs instead of
Unix shell scripts and Windows batch files.
Ah, ok, that makes much more sense.
Of course I am not talking about language constructs, I'm talking
about modules that implement portable libraries to emulate the usual
tasks that you do in shell scripts.
Usually not necessary because Perl programs are inherently portable unless
you deliberately make them non-portable.
Some things to watch out for:
- don't use external programs, i.e. don't use system(), backticks, qx//,
..... Chances are that external programs don't exist on other platforms.
Luckily most task which in shell require an external tool can be done
directly in native Perl without any problem
- use a forward slash as directory separator, not a backslash. While you can
use either one on WIndows Unix doesn't like the backslash.
- use the smallest common denominator for file names, i.e. Unix allows more
characters in file names than Windows. So use Windows restrictions.
- don't use absolute paths because the root in Unix and the root in Windows
are different.
Using your context, I didn't ask whether Pascal is good for writing
Who is "you"? I'm guessing you are replying to my answer, but please follow
standard customs and quote those text pieces which you are refering to.
COBOL programs, I asked whether there are Pascal libraries that could
simplify my job of writing programs to deal with fixed-length
records...
Well, to make the connection back to rewriting shell scripts in Perl: You
may consider Perl to be a much enhanced superset of shell scripting and
usually there is no need for any additional library to emulate shell script
behaviour. Even more, many of the tasks, which require forking of an
external program in shell, can be done more easily in native Perl.
jue