Base64 Decode Base64 Encode CSS Beautifier Url Encoder Url Decoder Image to Base64 Base64 to Image

Perl encode_base64()

Encode data by calling the encode_base64() function.

Function

encode_base64( $bytes, $eol );

Parameters

$bytes - String to be encoded.
$eol - The line-ending sequence to use. It is optional and defaults to '\n'.

Return value

The returned encoded string is broken into lines of no more than 76 characters each and it will end with $eol unless it is empty.

Example
use MIME::Base64;
$string = 'base64 encoded string';
$encoded = encode_base64($string);
Github

https://github.com/base64encode/examples/blob/master/base64encode.pl

See also:
Perl decode_base64