Monks, I seek your wisdom on matching an end of string/line using the qr quote like operator. I am simply trying to match a string of 8 characters, no more no less. This is not working as expected
here is my code
#!/bin/perl -w use strict; my $re = qr/\S{8}$/; my $input=""; until ($input=~m/$re/) { $input=<STDIN>; chomp $input; }
execution...
#./retest 1234 12345678 #./retest 123456789 #
In reply to End of String in qr// expression by gg48gg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |