Like perhaps most of the responses thus far. It isn't very clear what it is you are hoping to achieve with the script you've posted. Your script, as it is, won't work. If I understand your intended implementation. If I were to guess. I'd think you wanted to simply post a clever reply to someone who has perhaps entered their name in a web page you have on your web site (hosted, not on your own computer). As such, you might well modify your script above to look something like this
Give it a try, and see if it's what you were hoping to achieve. If it's not. I'm afraid you'll need to be a bit more specific as to your intended goal.#!/usr/bin/perl -w use strict; use CGI qw/:standard/; my $input = param("input")||""; print "content-type:text/html; charset=utf-8\n\n"; print qq(<!DOCTYPE html><head></head><body> <form method="post" action="realname.pl"> <label for="input">What is your name: </label><input type="text" name="input" value="" /> <input type="submit" value="Post Input" />); if ($input) { print qq(<br />Hello, $input<br />); }else{ print qq(<br /><br />); } print qq(</form></body></html>);
Best wishes.
--Chris
Yes. What say about me, is true.
In reply to Re: STDIN refuses input
by taint
in thread STDIN refuses input
by lcole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |