Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: match two elements from an array in a row

by shoness (Friar)
on Aug 17, 2007 at 08:53 UTC ( [id://633247]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    while ( /(8[[:xdigit:]])\s+\1/g ) {
      print "Duplicate $1 found at character " . pos() . "\n";
    }
    
  2. or download this
    bash$ superdoc.pl
    Duplicate 81 found at character 20
    Duplicate 82 found at character 68
    
  3. or download this
    # while ( /([[:xdigit:]]{2})\s+\1/g ) {
    
  4. or download this
    bash$ superdoc.pl
    Duplicate 81 found at position 20
    ...
    Duplicate 01 found at position 41
    Duplicate 00 found at position 53
    Duplicate 82 found at position 68
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-03-29 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found