in reply to Regexp to match regardless of whitespace
There's no modifier that let you skip anything.
If you're just grepping for string literals, it's trivial to change it to allow for spaces:
Otherwise, I'd do as suggested: remove the whitespace in the line, than apply the pattern.my $pattern = join '\s*', split //, "whatever"; while (<>) { print if /$pattern/; }
In Section
Seekers of Perl Wisdom