Mark,
I don't think I can use the block form, or am I confused? Maybe if I
change the form slightly I can do it. But the values of the variable do
change
eval("\$ret=\$data\=\~$filter");
I suppose I could strip the slashes and any modifiers from $filter and
rewrite it thus: eval{"\$ret=\$data\=\~/\$filter/\$mods"}
I understand this may be faster, but it's not clear from my
documentation what it would do differently. Is that what you had in mind?
And- how can I trap the warning? In this case it's coming from an embedded
$ in my string (which I can look for), but I'm concerned about other
warnings that I might not anticipat:-) Thanks again for the help!
On Wed, 21 Mar 2007, Mark Dootson wrote:
> Hi,
>
> I think 'Use of uninitialized value' is a warning, not an error.
>
> You may find the block form of eval better suited for your purpose.
>
> eval {
> $ret= $data =~ /$mymatch/;
> .....
> .....
> };
>
> if($@) { .....
>
>
> read 'perlfunc' on eval for usage.
>
> Regards
>
> Mark
>
>
>
>
>
>
>
--Nelson R. Pardee, Support Analyst, Information Technology & Services--
--Syracuse University, CST 4-191, Syracuse, NY 13244 --
--(315) 443-1079 [EMAIL PROTECTED] --
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs