In something like
print 'match' if $file =~ q|/Devel/|;
I'd be inclined to use qr|/Devel/| or better yet qr{ /Devel/ }xms (for various arcane reasons), or m//. But it may sometimes be useful to match directly against a string, either as a literal (but this seems rather quirky to me) or in a variable; as an example of the latter:
my $string = <$filehandle>;
...
do_something() if $something_else =~ $string;
(Of course, matching against a string read from an external source may have issues with metacharacter quoting, sanitization, etc.)
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Error in coverage module
by AnomalousMonk
in thread Error in coverage module
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |