skip to main | skip to sidebar

Nysele.com

Think different

Friday, October 3, 2008

Use Perl to Base64 encode and decode files

#!/usr/bin/perl
use MIME::Base64;

# Read entire file at once
local($/) = undef;

if($ARGV[0] eq "enc") {
  print encode_base64(<STDIN>);
}
else {
  print decode_base64(<STDIN>);
}
Posted by Erling Sjöström at 22:15
Newer Post Older Post Home

About

My photo
Erling Sjöström
Skellefteå, Sweden
View my complete profile
  • Apple Developer connection
  • Apple Mac OSX
  • Debian
  • FreeBSD
  • Goggle Code
  • Microsoft Developer Network
  • Microsoft Technet
  • Mono project
  • OpenSolaris
  • Ubuntu

Technical References

  • OASIS
  • RFC 1958
  • W3C

Documentation

  • Python
  • Perl

Blog Archive

  • ►  2015 (1)
    • ►  February (1)
  • ►  2012 (2)
    • ►  October (2)
  • ►  2011 (4)
    • ►  November (1)
    • ►  February (1)
    • ►  January (2)
  • ►  2010 (2)
    • ►  October (1)
    • ►  January (1)
  • ►  2009 (5)
    • ►  December (1)
    • ►  November (1)
    • ►  July (1)
    • ►  January (2)
  • ▼  2008 (14)
    • ►  December (4)
    • ►  November (2)
    • ▼  October (4)
      • Integrate Growl with syslog
      • Turbo C
      • Powered by FreeBSD 7.0
      • Use Perl to Base64 encode and decode files
    • ►  August (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2007 (6)
    • ►  December (6)

Search This Blog