I have the following code:
my $ftype; { my $assoc = `assoc .html`; $assoc =~ [EMAIL PROTECTED]@@; print "assoc: $assoc\n"; $ftype = `ftype $assoc`; $ftype =~ [EMAIL PROTECTED]@@; ## this line is referred to below print "ftype: $ftype\n"; }
Because I don't know what the content of $assoc is going to be, i.e. whether it will contain any characters that are regular expression meta-characters, I seem to want to apply \Q \E around the $alloc= string in the line marked above. But if I do, it appears that the $assoc is not interpolated. So I don't. But then what happens if $assoc contains RE meta-characters?
Is this a paradox, or is there a solution?
Sorry, it is too late at night. I convinced myself that
$ftype =~ [EMAIL PROTECTED]@@;
was the problem, but it must have been something else... and now I've figured out the something else... I need to chomp $assoc and $ftype at appropriate points.
Sorry for disturbing your sleep, but having resolved this one is going to make me sleep better!
-- Glenn -- http://nevcal.com/ =========================== The best part about procrastination is that you are never bored, because you have all kinds of things that you should be doing. _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs