Sample code for 30+ languages & platforms
Perl

Load utf-8 Text File into a StringBuilder

Demonstrates how to load a utf-8 text file into a StringBuilder object instance.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$sb = chilkat::CkStringBuilder->new();

$success = $sb->LoadFile("someFileContainingUtf8.txt","utf-8");
if ($success != 1) {
    print "Failed." . "\r\n";
}
else {
    print "Success." . "\r\n";
}