in reply to EOF in string

i think it looks like the problem is the missing space between print and << .

Update : I was wrong. Per the below, the space is not needed. I did download and test this, and the code works fine on my Windows machine. (Win98/Cygwin Bash/ActiveState 5.6.1). What kind of machine was this runing on ?
$ perl -e 'do() || ! do() ;' Undefined subroutine &main::try

Replies are listed 'Best First'.
Re:x2 EOF in string
by grinder (Bishop) on Dec 27, 2001 at 17:34 UTC
    Did you try this out? The << operator does not need to be disambiguated with whitespace, as the following code fragment shows:
    #! /usr/bin/perl -w use strict; print STDOUT<<text; foo bar text

    produces:

    foo bar

    Oops, uploaded the wrong fragment. I tested with an explicit file handle and without. Although for the sake of completeness I guess I should leave both up

    #! /usr/bin/perl -w use strict; print<<text; foo bar text

    --
    g r i n d e r
    just another bofh

    print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';