in reply to Pulling Data From A Command Line

Hate to give you the party line, but any reason why not to use CGI?:

use CGI; use strict; use warnings; my $q = new CGI; my $url = $q->url(-base); my $refer = $ENV{HTTP_REFERER}; my $maillocation = "/usr/sbin/sendmail"; my $stmail=$q->param('category'); my $tmail=$q->param('email'); my $tnmail=$q->param('password');

Update: Aristotle is defenitly right, added strict, warnings and a bunch of my's.

-- Dan

Replies are listed 'Best First'.
Re^2: Pulling Data From A Command Line
by Aristotle (Chancellor) on Oct 16, 2002 at 13:16 UTC
    Hate to give you the party line, but where's strict and warnings? ;-) Also, consider using the referer() method.
    #!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; my ($url, $ref, $sendmail) = ( $q->url(-base), $q->referer, "/usr/sbin/sendmail", ); # can't use list assingnment here because param() # may return more than one value my ($stmail, $tmail, $tnmail); $stmail=$q->param('category'); $tmail=$q->param('email'); $tnmail=$q->param('password');

    Makeshifts last the longest.