J. Mike Rollins (
Sparky
)
[rollins@wfu.edu]
CISSP
,
GIAC GPEN
Hyperbola
New
My Cats
New
Kitty
New
Mike is on
LinkedIn
FaceBook
Resume
My Stuff
Art
My Truck
People
Electronics
Jacob's Ladder
Scripts
Math
Notes
MySQL FK
smb
MIME
PHP/Perl Reference
SQL update
Base64
My House
My Cars
My Cats
New
My Jokes
Pi Poetry
pumpkin
Toro Mower
Development
Speed of a Piston
Not a Pipe
Linux
Base64
The following will read from STDIN. The input will be base64 decoded and sent to STDOUT.
> echo "VGhpcyBpcyBhIHRlc3QK" | ./decode.pl
This is a test
#!/usr/bin/perl use strict; use MIME::Base64; my $src; while (my $line =
) { $src .= $line; } my $decoded = decode_base64($src); print $decoded; # To encode and decode: # $encoded = encode_base64('original text'); # $decoded = decode_base64('encoded text');