Perl
Chilkat2 Perl
Reassemble a Previously Split File
Demonstrates how to reassemble a previously split file.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
my $fac = Chilkat2::FileAccess->new;
# Any type of file may be reassembled. It doesn't matter if it's
# a binary file or a text file.
my $reassembledFilename = 'hamlet2.xml';
my $partPrefix = 'hamlet';
my $partExtension = 'spl';
my $srcDirPath = '.';
# Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
my $success = $fac->ReassembleFile($srcDirPath, $partPrefix, $partExtension, $reassembledFilename);
if ($success) {
print "Success.\n";
} else {
print $fac->LastErrorText, "\n";
}