- or download this
# always use stric and warnings (till the moment you know when is safe
+ disabling them)
use strict;
...
X_202
X_203
X_204
- or download this
my $cur_num = $1 if $arr[$_] =~/\d*[A-Z]_(\d+)$/;
my $next_num = $1 if $arr[$_ + 1] =~/\d*[A-Z]_(\d+)$/;
- or download this
my ($cur_num,$next_num) = map {$1 if $_ =~/\d*[A-Z]_(\d+)$/} $arr
+[$_],$arr[$_+1];
- or download this
if ( $arr[$_] =~/\d*[A-Z]_(\d+)$/ ){
$cur_num = $1;
}