Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^6: Bolt on where a match is not found to a print script

by AnomalousMonk (Archbishop)
on Dec 06, 2017 at 17:27 UTC ( [id://1205034]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (my ($match) = m/$regex/g) {
        $matched{$match} = 1;
        print "$file $_";
    }
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my $regex = qr{ \b f[eio]e \b }xms;
    ...
    captured 'fee'
    captured 'fie'
    captured 'foe'
    
  3. or download this
    while (m/($regex)/g and my $match = $1) {
      print qq{captured '$match'};
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1205034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found