Hi Ben

"Ben Siders" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I believe that what he's after is a RE that will match the name of a
> variable proceded by a dollar sign.
>
> I.E., given this:
>
> $foo = "bar";
>
> if ( $var =~ /<some RE here>/ ) { print "true" }
>
> He wants the expression to evaluate true if $var contains the string
> $foo; that is, the character '$' followed by 'f' 'o' 'o', not the
> contents of the Perl variable '$foo'.  And it should evaluate to false
> even if $var contains the string "bar".  The question is what the RE
> should be.

That's what I thought. But that's what m/\$foo/ does, which is what he
wrote.

/R




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to