Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Use CGI to run a Perl script via web server

by kcott (Archbishop)
on May 25, 2017 at 11:37 UTC ( [id://1191206]=note: print w/replies, xml ) Need Help??


in reply to Use CGI to run a Perl script via web server

G'day suvajit123,

Welcome to the Monastery.

The code you posted:

#create CGI query object to get the SSO from URL my $sso = new CGI; my $sso = $query->param( "sso" );

Should probably be:

#create CGI query object to get the SSO from URL my $query = new CGI; my $sso = $query->param( "sso" );

You've used strict which would have aborted your script with:

Global symbol "$query" requires explicit package name (did you forget +to declare "my $query"?) at ...

That's probably in your web server logs. Consider using CGI::Carp, while developing, to see these types of messages immediately, with:

use CGI::Carp 'fatalsToBrowser';

You should also turn on warnings. Had you done so, Perl would have given you more help like this:

"my" variable $sso masks earlier declaration in same scope at ...

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1191206]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-18 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found