Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  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';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement