#!/usr/local/bin/perl -w use strict print "Content-Type: text/html\n\n"; print "\n"; print "\n"; #this chunk of code out put the input box. Got me? read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $value =~ s/\s*$//; $FORM{$name} = $value; # print "$FORM{$name} = $value
\n"; } #this is the end of the output code. Got me? $readthis = 'd:/209.35.237.237/perl/regex/work.txt'; open(READTHIS, "< $readthis") or die "I can't open readthis: $!\n"; print (); print "
\n"; print $value; print "

\n"; #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #this is the code I can not get to work #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ while ($line = ) { if ($line =~ /cat/) { print "yeppers!"; } } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ print < enter something:
EOF print "
\n"; print "";