home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!think.com!spool.mu.edu!sgiblab!sono!porky!mayer
- From: mayer@sono.uucp (Ron Mayer)
- Subject: Re: Perl IV & V incompatibilities?
- In-Reply-To: lwall@netlabs.com's message of Sat, 19 Dec 1992 02: 37:09 GMT
- Message-ID: <MAYER.92Dec20161916@porky.sono.uucp>
- Sender: mayer@acuson.com (Ron Mayer)
- Organization: Acuson; Mountain View, California
- References: <1992Dec17.175420.19745@merlin.dev.cdx.mot.com>
- <1992Dec19.023709.2700@netlabs.com>
- Date: Mon, 21 Dec 1992 00:19:16 GMT
- Lines: 34
-
-
- Larry Wall <1992Dec19.023709.2700@netlabs.com> lwall@netlabs.com writes:
- >In article <1992Dec17.175420.19745@merlin.dev.cdx.mot.com> lezz@merlin.dev.cdx.mot.com (Lezz Giles) writes:
- >:
- >: I'm getting a little bit scared about Perl V - [...]
- >: what _isn't_ compatible? What will need to be rewritten?
-
- So all we really need is a way to convert old perl scripts to new ones.
- IMHO this would also be a great way to get rid of obsolete perl
- constructs that are only kept around in the name of backward
- compatability (I think the fact that open() works with just one
- argument was once mentioned as such a feature).
-
- >Here's my current list of incompatibilities:
- >
- > The second and third arguments of splice are now evaluated in scalar
- > context (like the book says) rather than list context.
- >
- > [...more incompatabilities...]
-
- --------perl4toperl5.pl--------------
-
- s/(splice\([^,]+),([^,]+)/\1,(\2)[$[]/g;
- s/(splice\([^,]+,[^,]+),([^,]+)/\1,(\2)[$[]/g;
-
- -------------------------------------
- Ok, I did the first one; if 4 more people each do one, we're done. :-)
- (Actually, obviously it would need to be incorporated in a parser to
- work correctly; but you get the point). Could anyone who'se seen a
- perl parser tell me about how difficult it'd be to make a perl4 parser
- output the equivalent perl5 code?
-
- Ron Mayer
- mayer@acuson.com
-