$regexp = "m?" . <STDIN> . "?";
This won't work because STDIN reads a line which contains a newline at the end which won't match your example.
chomp( my $input = <STDIN> ); $regexp = qr/$input/; if $line =~ ?$regexp? ...
In reply to Re: Regex variables with delimiters
by jwkrahn
in thread Regex variables with delimiters
by clerew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |