#!/usr/bin/perl use strict; use warnings; my %hsh = ( Apple=>1, Banana=>7, Cherry=>42 ); my $txt = "The quick red fox jumped over the lazy brown dog"; my @ary = (17, 'Flugelhorn', 13.333); use Storable qw( nstore_fd ); open my $SF, '>', 'tst_Storable.db' or die "Error: $!\n"; nstore_fd \%hsh, $SF; nstore_fd \$txt, $SF; nstore_fd \@ary, $SF; close $SF;