Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Returning regexp pattern that was used to match

by crabbdean (Pilgrim)
on May 03, 2004 at 14:18 UTC ( #350016=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $f->do_this({
            '.*\.doc$'    => [qw/delete_me         1/],
    ...
            'dean'         => [qw/return_this        rel_file|stat_8/], 
            'F:/dean/     => ['mirror_to',        'C:\test']
            });
    
  2. or download this
    sub do_this {
        my ($self, $args) = @_;
    ...
        $self->{find} = $string;    ## this is the string to match files a
    +gainst
        #print $self->{find};
    }
    
  3. or download this
    if (/$self->{find}/) {
                    my $this = $&;
                    my $matched = ## find pattern used here
                    process($self, $_, $dir, $matched);
                }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://350016]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2014-10-01 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (21 votes), past polls