summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Simplestore.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Simplestore.pm b/lib/Simplestore.pm
index 35c94e2..b4446e5 100644
--- a/lib/Simplestore.pm
+++ b/lib/Simplestore.pm
@@ -34,9 +34,8 @@ sub load {
sub save {
my ($file, $store) = @_;
- my $key;
open(my $handle, '>', $file) or confess("Cannot open $file: $!");
- foreach $key (keys(%$store)) {
+ foreach my $key (keys(%$store)) {
if ($key !~ /^\w+$/) {
confess("Invalid key name: May only contain alphanumeric and _");
}