• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Redirecting after form submission

Based on what I know about Perl, I've come to the realization that you can't use "redirect" in the same Perl script where you also print an HTML header.  If you do, the "print redirect" command gets printed to the browser instead of being interpreted as a command.  If this is true, is there any way to use the redirect command in the same Perl script that uses the print->header() or other HTML header command?


1 Solution
You can't redirect unless you have not yet printed the full header. You need to either print the header later or print the redirection sooner. How you do that depends on your script and what you are trying to do.
marcparilloAuthor Commented:
Thanks -- that's what I figured.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now