On Mon, Jan 5, 2015 at 12:53 PM, Brandon McCaig <[email protected]> wrote:
>
> > Just like "print", but implicitly appends a newline. "say LIST"
> > is simply an abbreviation for "{ local $\ = "\n"; print LIST
> > }".
>
> print() already uses $\ so if that's all say() did it would have
> no effect. Instead, say() temporarily sets $\ to "\n" before
> printing so that the "record" ends with a newline.
And Perl should be noting which OS you're on and 'tranlating' "\n" into the
appropriate sequence. Though I get the same output for:
$ perl -e '{ local $\ = "\n"; print "hi" }' | perl -ne "print( ord($_),
qq{ }) foreach split(//)"
104 105 10
on, Mac, windows and Linux.
--
a
Andy Bach,
[email protected]
608 658-1890 cell
608 261-5738 wk