[comp.lang.perl] Bug in handling of $^@ ?

hansm@cs.kun.nl (Hans Mulder) (02/12/91)

If I type:

hostname% perl
$^@='Just another Perl hacker,';print$^@;

I get no output, whereas if I type:

hostname% perl
$^@='Just another Perl hacker,';
print$^@;

I get what I expect.

It doesn't seem to matter whether I spell the ^@ as two characters
(caret + at-sign) or as a single \000 character.
It does matter that I type this interactively; when I feed perl from
a file or a pipe, neither script works.


On an unrelated subject, if I type:

hostname% perl
$japh='Just another Perl hacker,';
print$

*not* followed by a newline (but by two ^D's), I get

parse error in file - at line 2, next 2 tokens "Just another"
EOF in string at - line 2.

I disagree with both "in string" and "next 2 tokens".

I'm using perl 3.0pl44 on a Sun3 running SunOS 4.1.


--
$^@='Just another Perl hacker,'; print $^@;

Hans Mulder	hansm@cs.kun.nl