sub do_this { my ($self, $args) = @_; my %hash = %{$args}; while (my ($d, $r) = each (%hash)) { $self->{actions}{$d} = $r; #print "D: $d\nR: @$r\n"; } my $string = undef; map {$string .= $_ . "|"} keys(%{$args}); $string =~ s/\|$//; ##remove the last pipe symbol $string = qr/$string/i; $self->{find} = $string; ## this is the string to match files against #print $self->{find}; }