if (@line = $_ =~ m/^(.....).(.....).(....).(...)..(....)....(........)(........)(........)/) { $x = $line[5]; $arrayx[$num] = $x; # more code }