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

Re: Redirecting from a scipt to another script

by jreades (Friar)
on Sep 06, 2000 at 18:19 UTC ( [id://31248]=note: print w/replies, xml ) Need Help??


in reply to Redirecting from a scipt to another script

I can make a few suggestions for exploration:

  1. If you want to do this via browser redirect are you sure that the script is exiting cleanly -- this is in line with what the Anonymous Monk suggested, but I'd definitely go with trying the redirect as the last line before exit 0;.

  2. This might also be a candidate for an exec() -- rather than redirecting to the new script, launch the script 'b' from within script 'a'. There was a good thread (at least, I sure learned a lot) just a couple of weeks back. You can read it here (the thread thread picks up about midway down and I'd particularly recommend: tilly's piece and that from geeksalad.

I also find it helpful to use the following line when debugging scripts that are on a server:

BEGIN { $| = 1; open(STDERR, ">&STDOUT"); print "Content-Type: text/pl +ain\n\n"; }

This nice snippet redirects STDERR to STDOUT and prints everything as text/plain to the browser -- then you can use your standard print $whatever . "\n"; while debugging.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found