Here's a few unsolicited comments. Perfect start with -w and strict. You then get CGI.pm to import a whole lot of functions into your namespace (via the qw/:standard/) but don't actually use any of them as you proceed to use the object oriented interface. Does not really hurt but suggest you don't quite understand what happens when you do this. Other than that quibble your indentation could use a little work, how about:

#!/usr/bin/perl -w use strict; use CGI; use CGI::Carp qw/fatalsToBrowser/; my $q = CGI->new(); if ( $q->param('pass') eq "securityrisk" ){ rename ("index.html", "old.html") || die "Can't rename: $!"; rename ("indexalt.htm", "index.html") || die "Can't rename: $!"; print $q->header( -target => 'ResultWindow', -nhp => 1, -expires => 'now', -location => 'http://www.thenewest.org/' ); }

All in all a good solid piece of code.

cheers

tachyon

Update

Fixed typo thanks crazyinsomniac

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Silly Badly Done Script Which Impresses the Heck Out of Client by tachyon
in thread Silly Badly Done Script Which Impresses the Heck Out of Client by jerrygarciuh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.