Link to home
Start Free TrialLog in
Avatar of fosiul01
fosiul01Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of kawas
kawas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fosiul01

ASKER

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.
i dont know anything about Mason ... but you probably need to

print "Content-type: text/html", "\n\n";
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!!!

https://www.experts-exchange.com/questions/25603055/Session-management-with-perl.html