#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11148149 use warnings; use Storable; my $filename = '/tmp/d.11148149.testfile'; my $hashref = eval { retrieve $filename } || {}; use Data::Dump 'dd'; dd $hashref; # was $hashref->{+time} = 1; # do something with $hashref... use Data::Dump 'dd'; dd $hashref; # is now store $hashref, $filename;
In reply to Re: Use a Serialized Hash... When It Might Not Exist?
by tybalt89
in thread Use a Serialized Hash... When It Might Not Exist?
by redapplesonly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |