use diagnostics; use strict; use Data::Dumper; my %sprockets; my %cogs; open FILES, "c:/cygwin/bin/find.exe data -type f -print|" or die "no data"; while(){ m[sprocket_logs/(\w+)\.(\d+)] and $sprockets{$1} = $2; m[cog_logs/(\w+)\.(\d+)] and $cogs{$1} = $2; } print Dumper(%sprockets, %cogs);