print problems - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

print problems

davidrtgdavidrtg Posts: 95Member
[b][red]This message was edited by davidrtg at 2003-11-26 11:59:23[/red][/b][hr]
Any ideas why
[code]
print "testing";
[/code]works but
[code]
print <<"EOF";
testing
EOF
[/code]doesn't work?
I'm thinking is something with the server that isn't configured to handle that? Everything else works fine. Any ideas?

EDIT:
This works as well
[code]
$test = <<"EOF";
testing
EOF

print $test;
[/code]

Thanks,
David


Comments

  • JonathanJonathan Posts: 2,914Member
    : Any ideas why
    : [code]
    : print "testing";
    : [/code]works but
    : [code]
    : print <<"EOF";
    : testing
    : EOF
    : [/code]doesn't work?
    : I'm thinking is something with the server that isn't configured to
    : handle that? Everything else works fine. Any ideas?
    Not really, that should work (read: does work 'cus I just tested it). Be careful you don't have whitespace (other than newline) immediately after the final EOF though; I remember that has caused me the odd bit of "fun" before now.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • davidrtgdavidrtg Posts: 95Member
    : : Any ideas why
    : : [code]
    : : print "testing";
    : : [/code]works but
    : : [code]
    : : print <<"EOF";
    : : testing
    : : EOF
    : : [/code]doesn't work?
    : : I'm thinking is something with the server that isn't configured to
    : : handle that? Everything else works fine. Any ideas?
    : Not really, that should work (read: does work 'cus I just tested it). Be careful you don't have whitespace (other than newline) immediately after the final EOF though; I remember that has caused me the odd bit of "fun" before now.

    Yah, I seem to be having a lot of the odd bit of "fun" haha. I'll have to check for the whitespace.

    Thanks,
    David

    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
    :
    :

Sign In or Register to comment.