in reply to Source Divers: string delimiters
I did a double take when first looking at that code -- it was immediately obvious that it was a mechanism to summon the associated balanced character for a terminator.
However, there is an identity function built in, implying that you can simply use two "closing" terminators. Which means stuff like this is correct perl:
my $str = qw)You can quote me on this);
It sure looks odd, but doesn't seem to break anything. Just goes to show you learn something every day.
Matt
Update: Hmmm, I forgot about the list behavior of said quoting construct. Here are some more clear examples:
@words = qw)You can quote me on this); $str = q)You can quote me on this);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Source Divers: string delimiters
by dcpve (Sexton) on Jul 24, 2002 at 19:50 UTC | |
by japhy (Canon) on Jul 24, 2002 at 19:53 UTC | |
by Aristotle (Chancellor) on Jul 25, 2002 at 20:43 UTC |