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
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |