Hi,
In a nutshell, I have been trying to store a reg. exp. in a variable so that
it can be called later. If it can be stored in a variable, is there any
penalty incurred in terms of run time efficiency, etc?
Explanation of the above question is given below:
I am storing the reg. exp. in "$variable" and use its contents for pattern
matching in two different ways.
1) $variable =
qq(^\s*Content\s+\w+,\s+\d{1,2}\s+\w+\s+\d{4}\s+\d+:\d+:\d+\s+-\d{4});
if (/$variable/) {
....processing
}
or something like this:
2) $variable =
qq(m/^\s*Content\s+\w+,\s+\d{1,2}\s+\w+\s+\d{4}\s+\d+:\d+:\d+\s+-\d{4}/);
if ($_ =~ $variable) {
....processing
}
Is it possible to something like that or is there any other way of doing it?
Your feedback will be greatly appreciated.
Looking forward to hearing from you,
naren
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]