You could always abuse a module which already parses STDIN for key=value pairs:
$ cat sin.pl #!/usr/bin/env perl use strict; use warnings; use CGI::Lite 3.00; my $cgi = CGI::Lite->new; my $params = $cgi->parse_form_data; $cgi->print_data; $ cat myin.txt txtpatid=foo txtpatpw=bar txtpatserver=guest $ ./sin.pl < myin.txt [ Reading query from standard input. Press ^D to stop! ] txtpatid = foo txtpatpw = bar txtpatserver = guest $
This isn't necessarily recommended - just showing that it's possible. YMMV.
In reply to Re: perl script that accepts parameters via STDIN
by hippo
in thread perl script that accepts parameters via STDIN
by mbravismore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |