manish.rathi has asked for the wisdom of the Perl Monks concerning the following question:

To verify CGI.pm module, I types following command and I could not figure out what the error is.

C:\perlfiles>perl -MCGI -e `print "CGI.pm version $CGI::VERSION\n";'
Can't find string terminator "`" anywhere before EOF at -e line 1.

Pls explain this message and how to check CGI.pm. One more thing is, if this message means that CGI.pm is not installed on my computer, then again thats a doubt. Because when I check "C:\Perl\lib", I find CGI folder there.

Replies are listed 'Best First'.
Re: verifying CGI.pm is installed or not
by almut (Canon) on Mar 05, 2009 at 22:39 UTC

    Your first quote character is a backtick character, for which there is no matching counterpart at the end...  Try (on Windows):

    C:\perlfiles> perl -MCGI -e "print qq{CGI.pm version $CGI::VERSION\n}; +"

    or, on Unix:

    $ perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'
Re: verifying CGI.pm is installed or not
by kennethk (Abbot) on Mar 05, 2009 at 22:39 UTC
    The problem is you opened your string with ` and closed it with '. Those do not match.
      thanks. Its working now
Re: verifying CGI.pm is installed or not
by Anonymous Monk on Mar 06, 2009 at 09:22 UTC