Help for this page

Select Code to Download


  1. or download this
    if($array[$i] =~ /Check-->\s*\d+$/)
    #          ^ C style loop counter?
    
  2. or download this
    for my $array(@array) {
        chomp $array;            # may be unnecessary for your aplication
        if ($array =~ /check-->(\S*\d+)(?:\])$/i) {    # \S Not-a-space, /
    +i case insensitive
    #                                   ^ also un-needed, for data shown, 
    +but a precaution
    #                                   against some possible elements in 
    +your __DATA__
           my $output = $1;     # Good approach; avoids reusing a left-ove
    +r match