Greetings, lcole.

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

#!/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>);
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.

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

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.