gstrock has asked for the wisdom of the Perl Monks concerning the following question:
gpg --gen-random 1 16 | gpg --enarmor | sed -n 5p
When I put it into a cgi script it always produces the same value of "=twTO". This happens even when I use HTML::Template and "ESCAPE HTML".J7Ld1bWb56ezv3GRF7RfBg==
----perl script-------------------------------------- #!/usr/bin/perl $serialno = `gpg --gen-random 1 16 | gpg --enarmor | sed -n 5p`; print $serialno;
----cgi script----------------------------------------- #!/usr/bin/perl -wT $serialno = `gpg --gen-random 1 16 | gpg --enarmor | sed -n 5p`; print "Content-type: text/html\n\n"; chomp($serialno); print "$serialno"; exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: works as a perl script, but not as cgi
by ikegami (Patriarch) on Dec 21, 2006 at 20:07 UTC | |
|
Re: works as a perl script, but not as cgi
by kyle (Abbot) on Dec 21, 2006 at 20:51 UTC | |
by gstrock (Initiate) on Dec 21, 2006 at 21:38 UTC | |
|
Re: works as a perl script, but not as cgi
by jdporter (Paladin) on Dec 21, 2006 at 22:57 UTC | |
|
Re: works as a perl script, but not as cgi
by chargrill (Parson) on Dec 21, 2006 at 20:00 UTC | |
|
Re: works as a perl script, but not as cgi
by f00li5h (Chaplain) on Dec 21, 2006 at 20:48 UTC | |
|
Re: works as a perl script, but not as cgi
by cub.uanic (Acolyte) on Dec 22, 2006 at 05:15 UTC | |
by gstrock (Initiate) on Dec 22, 2006 at 22:13 UTC |