in reply to How to use CGI::Carp

Had you looked at your screen, you have would seen this error:

syntax error at a.pl line 15, near "set_message" BEGIN not safe after errors--compilation aborted at a.pl line 16.

Had you looked at your log file, you would have seen this error:

Bareword found where operator expected at a.pl line 15, near "set_mess +age" (Missing semicolon on previous line?)

(I don't know why it was split into two instead of being written to both places.)

There's no semicolon between the 2nd and 3rd statement inside the BEGIN.

Replies are listed 'Best First'.
Re^2: How to use CGI::Carp
by Anonymous Monk on Jul 01, 2010 at 13:48 UTC
    How would re-write this code, based in what you commented on it?
      I would add the semi-colon I said was missing.
        I saw the semicolon but my question was related to this comment you made: "(I don't know why it was split into two instead of being written to both places.)"
      Is this homework or something? That's the only indication I can think of that would make you miss ikegami explaining exactly what's wrong.