in reply to Creative use of pack/unpack
Here is the most creative use of pack I've come up with:
But the rest of the code (that uses pack and unpack) is the spoiler so I'll obscure it:#!/usr/bin/perl -w use strict; my $password= "Not really"; hide( $password, "none of your business" ); print "password=($password), hide=(",hide($password),")\n"; $password= "No!"; print "password=($password), hide=(",hide($password),")\n"; # Prints: #password=(Not really), hide=(none of your business) #password=(No!), hide=(none of your business)
|
This allows you to store secret messages in scalars where no Perl code can find them (other than using pack/unpack or resorting to, for example, C code).
(updated)
- tye (but my friends call me "Tye")
|
|---|