in reply to disregard spaces while matching ?

The exact approach will depend upon the problem you;re trying to solve.

my $match = qr/Hello\s*World/; while (<DATA>) { print if /$match/; } __DATA__ Hello World Hello World Hello World .

Optionally, you could copy the string to match and remove the spaces prior to the match, but whether or not such a destructive behavior is desireable again depends upon your needs.

Cheers,
Ovid

New address of my CGI Course.