Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use Modern::Perl;
    # 934221
    ...
        next;
        }
    }
    
  2. or download this
    Current array element is: abcdABCD1234567890xyz
             Next 10 char after the match: 1234567890
    Current array element is: abcd12345ABCD0ABCD
    Current array element is: ABCD1234ABC
    Current array element is: qwertyABCD1234567890
             Next 10 char after the match: 1234567890
    
  3. or download this
    Current array element is: abcdABCD1234567890xyz
             Next 10 char after the match: 1234567890
    Current array element is: abcd12345ABCD0ABCD
    ...
    Current array element is: qwertyABCD1234567890
             Next 10 char after the match: 1234567890
    Current array element is: ABCD 123 456 789
    
  4. or download this
    my @content = qw/abcdABCD1234567890xyz abcd12345ABCD0ABCD ABCD1234ABC 
    +qwertyABCD1234567890/;
    push @content,  'ABCD 123 456 789';
    
    ...
            say "No match on $content";
        }
    }
    
  5. or download this
    ===> $content[4]: ABCD 123 456 789
    
    
    ...
             Next 10 char after the match: 1234567890
    Current array element is: ABCD 123 456 789
             Next 10 char after the match: 1234567890
    
  6. or download this
    for my $content(@content) {
        # my $match = '';  # explicit but verbose
        # my $match;         # still explicit and only slightly less verbo
    +se; same effect
    ...
            say "No match on $content";
        }
    }
    
  7. or download this
    my @content = qw/abcdABCD1234567890xyz 
                abcd12345ABCD0ABCD 
                ABCD1234ABC 
    ...
    C:\>
    
    =cut