The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/local/bin/perl

use blib;
use strict;
use warnings;

use AFS::VLDB;

my ($vldb, $server, $partition, $ok);

die "Usage: $0 server [partition]\n" if $#ARGV < 0;

$server    = shift;
$partition = shift;

$vldb = AFS::VLDB->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

if (defined $partition) {
    $ok = $vldb->syncserv($server, $partition);
    if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
    else            { print "Server $server partition $partition synchronized with VLDB \n"; }
}
else {
    $ok = $vldb->syncserv($server);
    if ($AFS::CODE) { print "AFS::CODE = $AFS::CODE\n"; }
    else            { print "Server $server synchronized with VLDB \n"; }
}