- or download this
# regex /.{0,3}X.{0,3}/
#
...
X123 X123
X123456 X123
- or download this
# regex /.{3}X.{3}/
#
...
X123 -no match-
X123456 -no match-
- or download this
# open my $fh, '<', $file_path or die "unable to read $file_path"
...
# so to read a file one line at time:
while (defined( my $line= <$fh>)) {