sub qx_cache { my $cmd = shift; my $cache = Cache::FileCache->new({ namespace => $0 }); die 'no cache' if ! $cache; my $out = $cache->get( $cmd ); if ( ! defined $out ) { $out = qx{ $cmd }; $cache->set( $cmd, $out ); } return $out; }