[comp.lang.perl] semicolon after -e arguments

piet@cs.ruu.nl (Piet van Oostrum) (03/23/90)

In article <7501@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax (Larry Wall) writes:
 `In article <1990Mar21.163855.13099@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes:
 `: In article <7490@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax (Larry Wall) writes:
 `: | Note the blank line at the end.  A not-so-obvious improvement is that
 `: | the last semicolon is now optional.  (For shame!  You of all people
 `: | should have thought of this one, Randal!)
 `: 
 `: I thought that was just for 'eval' (because of my original request).
 `
 `That was for -e.  eval has assumed a semicolon for a long time.
 `
 `But it was easier to assume ; on all perl scripts than just on -e.
 `
But that broke it: consider: perl -pe s/piet/PIET/

This generates a syntax error because the ';' is appended to the end of the
resulting perl script, not to the end of the -e argument.
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31-30-513791   Internet:  piet@cs.ruu.nl   (*`Pete')