home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7568 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.8 KB  |  48 lines

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