in reply to How to Base64 Encode an array variable??
Perl URL-encodes it
No it doesn't. LWP doesn't touch the content of your request or response.
Now I want to Base64 encode @rawdata
In general, you'd need to serialize your data in some way.
In this case, you started with serialized data. Why do you split a binary file into "lines"?
open(my $fh, '<', $datafile) or die ("Could not open file \"datafile\": $!\n"); binmode($fh); my $rawdata; { local $/; $rawdata = <$fh>; }
Note that by base64-encoding your bytes, you're making your data 25% bigger for nothing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to Base64 Encode an array variable??
by zentara (Cardinal) on Feb 01, 2010 at 16:15 UTC | |
by ikegami (Patriarch) on Feb 01, 2010 at 16:58 UTC |