Perl
Chilkat2 Perl
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $crypt2 = Chilkat2::Crypt2->new;
# The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
my $encodedStr = 'SGVsbG8gV29ybGQ=';
my $encoding = 'base64';
my $charset = 'utf-8';
my $str = $crypt2->DecodeString($encodedStr, $charset, $encoding);
print $str, "\n";
# Output is "Hello World"