Can't find string terminator "\nEND" anywhere before EOF : (6 lines script)

why the bellow script is giving me error  as

 Can't find string terminator "\nEND" anywhere before EOF  at /cgi-perl/mason.pl line 6.\n


#!/usr/bin/perl
  
  use strict;
  use HTML::Mason;
  my $interp = HTML::Mason::Interp->new( );
  my $comp = $interp->make_component(comp_source => <<'END');
   Greetings, <% ("Earthlings", "Martians")[rand 2] %>
  END
  $interp->exec($comp);

Open in new window

LVL 29
fosiul01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kawasCommented:
END needs to be on a line without any spaces ...
#!/usr/bin/perl
  
  use strict;
  use HTML::Mason;
  my $interp = HTML::Mason::Interp->new( );
  my $comp = $interp->make_component(comp_source => <<'END');
   Greetings, <% ("Earthlings", "Martians")[rand 2] %>
END
  $interp->exec($comp);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fosiul01Author Commented:
thanks
its seems allright

but do you have any idea why its giving me this error

 [Tue Mar 30 15:02:13 2010] [error] [client xx.xx.xx.xx] malformed header from script. Bad header=   Greetings, Earthlings: mason.pl
[Tue Mar 30 15:02:13 2010] [warn] /cgi-perl/mason.pl did not send an HTTP header

i thought massion handle all html by it self.
0
kawasCommented:
i dont know anything about Mason ... but you probably need to

print "Content-type: text/html", "\n\n";
0
fosiul01Author Commented:
yum you are damm right

that allow to print..


thanks

can you please look into this question please... its seems , in EE , not too many ppl visit perl zone!!!

http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_25603055.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.