Sample code for 30+ languages & platforms
Perl

Decode Base64

Demonstrates how to decode base64.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $bd = Chilkat2::BinData->new;

# Append a base64 string to bd.
my $success = $bd->AppendEncoded('c2VjcmV0', 'base64');

# The bd now contains the decoded bytes.
# Let's say it was a password string..
my $password = $bd->GetString('utf-8');

# Decodes to "secret".
print 'password = ', $password, "\n";