Well, one possibility is something like:
#!/usr/bin/perl -w
use strict;
exec('/bin/tcsh', '/path/to/yourshellscript');
__END__
But the only real option is to learn enough Perl to re-implement
your scripts in Perl, or find another human who can do so for you.
There is no tcshell2perl converter. See this faq for
further enlightenment.
| [reply] [d/l] |
As an interesting learning experience, writing a hack on that
though isn't bad. I've written one for ksh and, I kid you
not, dbase (surprisingly easy, that one). Yes, they were
not good or complete, but helpful both in getting my
old shell scripts to perl and in learning what I can/should
be doing w/ perl. Mostly its just things like
renaming variables, munging while/if stmts and tiding
up the punctuation, not smoothing the logic. Now, I think
I'd just start fresh (w/ 'use CGI;' at the top ;-) but
then it quickly got me a bunch of perl to work on w/ a
specific purpose; duplicate what my shell script was doing.
a | [reply] |