From a42746b136af9ddf5f0460f32a7fb49ba76783d4 Mon Sep 17 00:00:00 2001 From: southpawgeek Date: Sat, 29 Feb 2020 11:18:56 -0500 Subject: skipping challenge #2 --- challenge-049/southpawgeek/ch-2.pl | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 challenge-049/southpawgeek/ch-2.pl diff --git a/challenge-049/southpawgeek/ch-2.pl b/challenge-049/southpawgeek/ch-2.pl deleted file mode 100644 index d2488c6d53..0000000000 --- a/challenge-049/southpawgeek/ch-2.pl +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use feature qw/say/; - -my ($size) = @ARGV; -die "$size isn't an int! \n" if $size =~ /\D/; -$size = 3 unless $size; -say "set cache size to $size"; - -set(1, 3); -set(2, 5); -set(3, 7); -get(2); -get(1); -get(4); -set(4, 9); -get(3); - -my (%cache, @keys); - -sub set { - my ($key, $value) = @_; - push @keys, $key; - $cache{$key} = $value; - say "key order.. @keys"; -} - -sub get { - my $key = shift; - say $cache{$key}; - say "key order.. @keys"; -} -- cgit