iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • I love the code... dot com
    125,001

    iLoveTheCode.com
    Perl > Perl Tutorials How To Easy > Redirect to a Different URL in Perl

    Redirect to a Different URL in Perl



    To go to another URL:

    print "Location:http://google.com\n\n";

    IMPORTANT: If you've already sent header like:

    print "Content-type:text/html\n\n";

    ...the redirect will not work.

    Make sure you end the URL with two line returns \n\n so the script knows it's a header and it's time to go.


    Copy and Paste Perl Code:

    #!/usr/bin/perl

    print "Location:http://google.com\n\n";

    exit;


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Renaming a File with Perl's RENAME Function
    Next Article: If, Elsif, and Else in Perl





    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.85

    New Perspectives on Crea...New Perspectives on Creating Web Pag...

    Patrick Carey

    New $69.26

    New Perspectives on HTML...New Perspectives on HTML and XHTML 5...

    Partrick Carey

    New $67.45

    Information Architecture...Information Architecture for the Wor...

    Louis Rosenfeld, P...

    New $26.39

    CSSCSS

    David McFarland

    New $23.09

    JavaScriptJavaScript

    David Flanagan

    New $31.49

    Creating Web SitesCreating Web Sites

    Matthew MacDonald

    New $19.77

    HTML & XHTMLHTML & XHTML

    Chuck Musciano, Bi...

    New $29.99

    Bulletproof Web DesignBulletproof Web Design

    Dan Cederholm

    New $23.99


    Of Interest:
  • Renaming a File with Perl's RENAME Function
  • Add to End of an Array with Push in Perl
  • Add, Subtract, Multiply, and Divide in Perl
  • Getting Server Time in Perl
  • Getting Epoch Time in Javascript
  • Javascript Reset Form
  • Increment a Variable in Javascript
  • Use onClick in Javascript
  • HTML Frames
  • HTML Tables
  • Make a New Paragraph Using HTML
  • HTML Body Tag

  • More Articles:
  • Renaming a File with Perl's RENAME Function
  • OPEN and WRITE a Data File in Perl
  • Exit a Script or Subroutine in Perl
  • And, Or, Equal, Not Equal, Greater Than, Less Than in Perl
  • onClick Javascript
  • Reading Cookies using Javascript
  • Use onClick in Javascript
  • Match with a Regular Expression, REGEX, in Javascript
  • Write a For Loop in Javascript
  • HTML Superscript Text
  • Make Strikethrough Text Using HTML
  • HTML Background
  • Make Text Bold Using HTML

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    421,766
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:17 EDT