HEX
Server: Apache
System: Linux web2.fi.cloudlogin.co 5.10.241-xeon-hst #3 SMP Fri Aug 29 13:26:38 UTC 2025 x86_64
User: otjinenec (286614)
PHP: 8.3.25
Disabled: NONE
Upload Files
File: //bin/puudecode
#!/usr/bin/perl

use strict;
use Convert::UU 'uudecode';
die "Usage: $0 file\n" unless @ARGV==1;
open F, $ARGV[0] or die "Couldn't open $ARGV[0]: $!";
my($uudecoded_string,$file,$mode) = uudecode(\*F);
open F, ">$file" or die "Can't open >$file: $!";
binmode(F);
print F $uudecoded_string;
close F;
chmod oct($mode), $file;

__END__

=head1 NAME

 puudecode - perl replacement for uudecode

=head1 SYNOPSIS

 puudecode inputfile

=head1 DESCRIPTION

Uudecode reads a uuencoded inputfile and writes the decoded string to
the file named in the uuencoded string. It changes the permissions to
the mode given in the uuencoded string.

=head1 BUGS

This implementation is much slower than most uudecode programs written
in C. Its primary intention is to allow quick testing of the
underlying Convert::UU module.

=head1 SEE ALSO

puuencode(1), Convert::UU(3)

=head1 AUTHOR

Andreas Koenig E<lt>andreas.koenig@anima.deE<gt>

=cut