On 5/10/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:

I'm looking at some sample code from an opensource software package, and
had a question on the the usage of '\' in the following:

                username => \ &common_name_validator

There is an explicit space list between \ and &common_name_validator in
the example. I know that if you place a blackslash in front of a
reference, it returns an object, I believe.

Not so much. You're probably thinking about how, if you put a
backslash in front of a variable, you get a reference to the variable.

But what purpose does \ have
as a standalone construct? Or is this merely a typo?

The backslash is a unary operator in Perl, documented in the perlop
and perlref manpages. It's not the same as the backslash used within
string literals, so it's allowed to have optional whitespace between
it and its operand.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to