in reply to csh-perl xlator
The thing that has always prevented anyone from writing such a program is that it's very hard! It's easy to do a really bad job, but to do a good job, you have to be very clever. For example, suppose you see this:
The obvious (bad) translation is:set bar=`echo $foo | awk '{print $5}' | cut -c1-4`
But the right translation is:$bar=`echo $foo | awk '{print \$5}' | cut -c1-4`
Anyway, aside from an April Fool's joke that Randal perpetrated a few years ago, there is no shell-to-perl translator that I know of.$bar = substr((split($foo))[4], 0, 4);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: csh-perl xlator
by a (Friar) on Dec 19, 2000 at 09:55 UTC |