If you have random non-base64 chars in the string, maybe it isn't base64encoded? Or else it is a clever attempt at encryption by obfuscation? Anyways, this will do it.
#!/usr/bin/perl
use warnings;
use strict;
my $str = 'Toni';
print "$str\n";
$str =~ tr#A-Za-z0-9+/##cd; # remove non-base64 chars
print "$str\n";
exit;