Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Simple perl encoder

by Tux (Canon)
on Sep 28, 2011 at 06:29 UTC ( [id://928239]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Storable qw( nfreeze thaw );
    my $game_data = {
    ...
    my $enc = unpack "H*" => nfreeze ({ game_data => $game_data });
    # $enc now contains something like
    # 05080300000001040300000004088300000004686974730a0953757065726e6f7661
    +000000046e616d6509000005910000000573636f72650a04302e33340000000861636
    +375726163790000000967616d655f64617461
    
  2. or download this
    use Storable qw( nfreeze thaw );
    my $game_data = thaw (pack "H*" => $enc)->{game_data};
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://928239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-20 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found