[Pdx-pm] Not a syntax error?

David Wheeler david at kineticode.com
Mon May 2 16:12:18 PDT 2005

On May 2, 2005, at 15:57 , Steve Bonds wrote:

> -----
> #!/usr/local/bin/perl -w
> print "This is a line without a semicolon\n".
> exit 1;
> -----
> It almost seems like the print line uses string concatenation to
> absorb the exit line-- but it doesn't.  The exit line is executed
> properly and the above perl terminates with status 1, however the
> output from the print statement is never seen.
> This didn't generate a warning using perl 5.8.0.  Should it have?

The output of "exit 1" would be appended to the string sent to the  
print statement, but the program exits before the appending happens-- 
and certainly before "print" executes.



More information about the Pdx-pm-list mailing list