Gossamer Forum
Home : General : Perl Programming :

Perl and binary input

Quote Reply
Perl and binary input
I want to pass a single argument into a perl script on my server. I am using the http POST command and passing in a buffer of binary data. Unfortunately, as it is binary data it sometimes includes special characters like & and ? which usually need to be passed in as %xx where xx is the ASCII code. Is there any way to get my script to just read in the whole buffer 'as is' without doing any preprocessing?

Quote Reply
Re: Perl and binary input In reply to
I think I have figured this out so I thought I'd post my solution now. It seems that $ENV{'QUERY_STRING'} contains the entire command line 'as is' without any worrying about special characters. This allows me to pass in a big load of data and read it into a variable easily.