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::BOS;

my ($server, $cellname, $logfile, $bos);

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

$server   = shift;
$cellname = shift if $#ARGV == 2;
$logfile  = shift;

if ($cellname) { $bos = AFS::BOS->new($server, 0, 0, $cellname); }
else           { $bos = AFS::BOS->new($server); }
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n" and die;

print "Fetching log file \'$logfile\' ...\n";
my @log = $bos->getlog($logfile);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";

print join('', @log);

$bos->DESTROY;