[Israel.pm] perl -e weirdness

Gaal Yahas gaal at forum2.org
Thu Aug 12 04:27:01 PDT 2004

On Thu, Aug 12, 2004 at 02:18:11PM +0300, Offer Kaye wrote:
> Does anybody have any idea why:
> perl -e 'print "Hello' -e 'World\n"'
> 1. Even works?
> 2. prints a newline after the "Hello"?

Multiple -e switches work by concatenating lines joined by newlines. You
can verify this by running the following one-liner:

% perl -le 'print __LINE__;' -e 'print __LINE__'

Gaal Yahas <gaal at forum2.org>

More information about the Perl mailing list