in reply to test case for Persistance.pm
in thread Persistence.pm
persistent '%hash';#!/usr/local/bin/perl -w # # name: persistest # # does stuff # works fine use vars qw( %hash ); use strict; use Persistence 'test.dat';
whilemy ($k, $v, $n);
The loop funniness was due to using foreach instead of while over the calls to each %hash.(($k, $v) = each %hash) { $n++; print "$n: $k => $v\n"; } %hash = ( blue => 'berries', red => 'roses', black => 'coffee', yellow => 'bananas', ); END { persistent '%hash'; }
Nothing to see here. Move along.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ea answers own question!
by g0n (Priest) on Mar 30, 2005 at 13:21 UTC |