Hi,
I installed Mason and used the cpan.pm module to automate the process to get
the required perl modules.
I copied a program from the book named it "handshake.pl". Its from the Mason
book (O' Reilly publications). But I am getting the following errors, please
help:
C:\Perl\bin\perl>handshake.pl
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1, near "rtf1\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1near "ansi\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1, near "ansicpg1252\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline1, near "deff0\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "f0\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "fnil\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "f1\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "froman\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "f2\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 1,near "fswiss\"
Bareword found where operator expected at C:\Perl\bin\perl\handshake.pl line
2,near "*\generator"
(Missing operator before generator?)
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 2,near "viewkind4\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 2,near "uc1\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 2,near "pard\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 2,near "f0\"
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 4,near "par
\"
(Missing semicolon on previous line?)
Backslash found where operator expected at
C:\Perl\bin\perl\handshake.plline 4,near "f1\"
syntax error at C:\Perl\bin\perl\handshake.pl line 1, near "rtf1\"
syntax error at C:\Perl\bin\perl\handshake.pl line 1, near "f1\"
syntax error at C:\Perl\bin\perl\handshake.pl line 1, near "f2\"
syntax error at C:\Perl\bin\perl\handshake.pl line 1, near "}}"
syntax error at C:\Perl\bin\perl\handshake.pl line 4, near "par
\"
"use" not allowed in expression at C:\Perl\bin\perl\handshake.pl line 4, at
end
of line
"use" not allowed in expression at C:\Perl\bin\perl\handshake.pl line 5, at
end
of line
syntax error at C:\Perl\bin\perl\handshake.pl line 5, near "par
use strict"
syntax error at C:\Perl\bin\perl\handshake.pl line 6, near "par
my "
syntax error at C:\Perl\bin\perl\handshake.pl line 7, near "par
my "
C:\Perl\bin\perl\handshake.pl has too many errors.
C:\Perl\bin\perl>^A
Here is the handshake.pl code:
#!/usr/local/bin/perl
package HTML::Mason;
use HTML::Mason;
use strict;
my $interp = HTML::Mason::Interp->new( );
my $comp = $interp->make_component(comp_source => <<'END');
Greetings, <% ("Earthlings", "Martians")[rand 2] %>
END
$interp->exec($comp);
Please help :(. Whats wong with the code and what do these errors mean?
Thanks.
Charmie
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users