in reply to Re^5: OOP first-timer seeks feedback; likes long walks on the beach.
in thread OOP first-timer seeks feedback; likes long walks on the beach.
my @files = ( ... ); my $count; my %data; IterateOver::files({ pre => sub { print "Starting on file $_.\n"; $count = 0; }, loop => sub { if (/^[^#]/ and /^(.*?)\s*=\s*(.*?)\s*(?:#.*)$/) { $data{$1} = $2; ++$count; } }, post => sub { print "Found $count keys in $_.\n"; print "Total unique keys so far: ", scalar keys %data, "\n"; }, @files );
|
|---|