in reply to How to convert an @ARGV to form based input?

Your problem seems to be that you do not know how to get the data from your form field into your script.

The old but venerable Ovid's CGI course (sadly now only found on the way-back engine) will explain it to you. Lessons 4 and 5 are particularly to the point.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics
  • Comment on Re: How to convert an @ARGV to form based input?

Replies are listed 'Best First'.
Re^2: How to convert an @ARGV to form based input?
by taint (Chaplain) on Aug 21, 2012 at 16:50 UTC
    Greetings @CountZero, and thank you for your continued efforts.
    Well, I see what the problem has been. Using the advice listed within this thread -- including my own thoughts, have all returned the POSTed data as $domain=blah..., instead of turning $domain into blah... -- which was what the title suggested ;).
    So. I think the best idea will be to abandon the use of NET::DNS::*, and simply slurp the form input data, and pass it to my system via a:
    read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});.
    This worked quite well for my whois script, and I was able to easily sanitize the input by filtering $temp before handing it off to the system itself.
    Thanks again, to you, and everyone else who attempted to help me solve this problem.
    Perhaps this dialog will help others who fall into this dilemna. :)
    --Chris
    #!/usr/bin/perl -Tw
    use perl::always;
    my $perl_version = "5.12.4";
    print $perl_version;