in reply to CGI Question . . .
a=20 b=30 arg=40 If t.pl is your script then execute as t.pl < v.txtsample :
results:use CGI; my $page=new CGI ; if (! $page->param() ) { print ".. will NOT read from STDIN\n"; } else { print ".. will read from STDIN\n"; foreach ( $page->param () ) { print "$_ = @{[$page->param ($_)]}\n"; } }
(offline mode: enter name=value pairs on standard input) .. will read from STDIN a = 20 y = 30 arg = 40Note: for more powerful solutions you may want to look at how the function read_from_cmdline in CGI.pm is used and called and what it does.
|
|---|