leszekdubiel has asked for the wisdom of the Perl Monks concerning the following question:
Die should never happen because empty pattern matches any text... Why? Why? Same on 5.24 and 5.26. Linux Debian. The codeprintf "alfa\nwhatever" | perl -CSDA -n -e '// or die "not possible! - +- $_ --"; /alfa/;'
also fails, but this one not (!!!!):printf "alfa\nwhatever" | perl -CSDA -n -e '// or die "not possible! - +- $_ --"; /al/;'
printf "alfa\nwhatever" | perl -CSDA -n -e '// or die "not possible! - +- $_ --"; /a/;'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Empty Regex never fails but failed?
by haukex (Archbishop) on Feb 12, 2018 at 23:22 UTC |