Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: match two elements from an array in a row

by shoness (Friar)
on Aug 17, 2007 at 08:53 UTC ( #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
Node Status?
node history
Node Type: note [id://633247]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2020-12-04 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (58 votes). Check out past polls.

    Notices?