$url = "$From-a-Transform-of-the-Makedb.pl-Results"; print "Location: $url\n\n"; exit; #### `perl makedb.pl > testout.txt`; sleep 1 while ( !(-e "testout.txt") ); use File::Copy; copy("testout.txt", "testout2.txt") or die "File cannot be copied."; $file = "testout.txt"; unlink($file); { local $/=undef; open FILE, "testout2.txt" or die "Couldn't open file: $!"; binmode FILE; $content = ; close FILE; } # URL that generated this code: # http://txt2re.com/index.php3?s=[3418]./img10_small.bmp&7 $txt=$content; $re1='.*?'; # Non-greedy match on filler $re2='(\\d+)'; # Integer Number 1 $re=$re1.$re2; if ($txt =~ m/$re/is) { $int1=$1; print "http://www.godskingsandheroes.info/stamps/seek.cgi?id=$int1"; } #----- # Paste the code into a new perl file. Then in Unix: # $ perl x.pl #----- #### my $url = $From-a-Transform-of-the-Makedb.pl-Results; # See the code just above print redirect( -URL => $url); #### print qq~~; blahblahcode; print qq~~; #### sub PrintHead { print qq~Content-type: text/html\n\n~; BEGIN { my $homedir = ( getpwuid($>) )[7]; my @user_include; foreach my $path (@INC) { if ( -d $homedir . '/perl' . $path ) { push @user_include, $homedir . '/perl' . $path; } } unshift @INC, @user_include; } use CGI::Application::Plugin::Redirect; sub byebye { my $self = shift; return $self->redirect("http://www.godskingsandheroes.info/stamps/seek.cgi?id=2225", '301 Moved Permanently'); # Just trying to get an example working... } print qq~ PerlServices.net Free upload utility ~; }