J. Mike Rollins (
Sparky
)
[rollins@wfu.edu]
CISSP
,
GIAC GPEN
Mike is on
LinkedIn
FaceBook
Resume
My Stuff
Art
My Truck
People
Electronics
Jacob's Ladder
Scripts
Math
Notes
smb
SQL update
PHP/Perl Reference
Base64
MySQL FK
MIME
My House
My Cars
My Cats
My Jokes
Pi Poetry
pumpkin
Toro Mower
Development
Linux
Not a Pipe
Speed of a Piston
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');