| Server IP : 170.10.161.225 / Your IP : 216.73.216.77 Web Server : Apache System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : calvet ( 273824) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : ON Directory : /bin/ |
Upload File : |
#!/usr/bin/perl use strict; use Convert::UU 'uuencode'; my($file,$as_file) = @ARGV; $as_file ||= $file; my $stat = (stat $file)[2] or die "Couln't stat $file: $!"; my($mode) = sprintf "%04o", $stat & 07777; open F, $file or die "Couldn't open $file: $!"; binmode(F); print uuencode(\*F,$as_file,$mode); close F; __END__ =head1 NAME puuencode - perl replacement for uuencode =head1 SYNOPSIS puuencode inputfile as_outputfile =head1 DESCRIPTION Puuencode reads the inputfile and writes a printable version of it to STDOUT in uuencoded style. Nothing fancy, just a simple uuencode replacement. =head1 BUGS This implementation is much slower than most uuencode programs written in C. Its primary intention is to allow quick testing of the underlying Convert::UU module. =head1 SEE ALSO puudecode(1), Convert::UU(3) =head1 AUTHOR Andreas Koenig E<lt>andreas.koenig@mind.deE<gt> =cut