Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Use a Serialized Hash... When It Might Not Exist?

by kcott (Archbishop)
on Nov 12, 2022 at 02:33 UTC ( [id://11148154]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
    $serial_data_for->@{@keys} = @vals;
    
    store($serial_data_for, $hashfile);
    
  2. or download this
    #!/usr/bin/env perl
    
    ...
    $serial_data_for->@{@keys} = @vals;
    
    store($serial_data_for, $hashfile);
    
  3. or download this
    ken@titan ~/tmp
    $ rm pm_11148149_storable_first_run.sto
    ...
    
    ken@titan ~/tmp
    $
    
  4. or download this
    sub DoIHaveThisData {
        my ($hash, $key) = @_;
        return exists $hash->{$key};
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-23 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found