#!/usr/bin/perl -w
# vim: set sw=4 ts=4 si et:  written by Guido Socher
unless($ARGV[1]){
    print "USAGE: uuencode.pl fileToEncode filenameToUseForDecoding
Example: uuencode.pl /tmp/file.gz file.gz
";
    exit 0;
}
open (FH, $ARGV[0]) || die "ERROR: can not read $ARGV[0]\n";
binmode(FH);
my $t;my $bindat="";
while(read(FH,$t,1000)){ $bindat.=$t;}
close FH;
print "begin 644 $ARGV[1]\n";
print (pack 'u', $bindat);
print "`\nend\n";
# end of uuencode.pl