Perl

Moderators: Jonathan
Number of threads: 1236
Number of posts: 3605

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
print problems Posted by davidrtg on 26 Nov 2003 at 11:50 AM
This message was edited by davidrtg at 2003-11-26 11:59:23

Any ideas why
print "testing";
works but
print <<"EOF";
testing
EOF
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
$test = <<"EOF";
testing
EOF

print $test;


Thanks,
David


Report
Re: print problems Posted by Jonathan on 27 Nov 2003 at 3:14 AM
: Any ideas why
:
: print "testing";
: 
works but
:
: print <<"EOF";
: testing
: EOF
: 
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.");

Report
Re: print problems Posted by davidrtg on 27 Nov 2003 at 11:35 AM
: : Any ideas why
: :
: : print "testing";
: : 
works but
: :
: : print <<"EOF";
: : testing
: : EOF
: : 
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.");
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.