SHARE
TWEET

Untitled

a guest Jun 15th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/opt/perl-5.28.0/bin/perl
  2.  
  3. use v5.28;
  4. use warnings;
  5. use FindBin '$RealBin', '$RealScript';
  6. use lib "$RealBin/local/lib/perl5", "$RealBin/lib";
  7.  
  8. use DateTime::Format::Strptime;
  9. use Storable 'store', 'retrieve';
  10. use Data::Dumper;
  11. use Scalar::Util 'weaken';
  12.  
  13. my $foo = [
  14.     DateTime::Format::Strptime->new(
  15.         pattern => '%Y-%m-%d %H:%M',
  16.         time_zone => 'UTC',
  17.     ),
  18.     {},
  19. ];
  20.  
  21. $foo->[1]{a}{b} = $foo->[1];
  22. weaken $foo->[1]{a}{b};
  23.  
  24.  
  25. print Dumper($foo->[1]);
  26.  
  27. store $foo, './big_array.dat';
  28. retrieve './big_array.dat';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top