Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Source Divers: string delimiters

by mojotoad (Monsignor)
on Jul 24, 2002 at 19:40 UTC ( [id://184996]=note: print w/replies, xml ) Need Help??


in reply to Source Divers: string delimiters

Wow, life outside of hash-think.

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
    I expect we'll be seeing this in JAPHs and obfus pretty soon, now that it's been brought to the general attention.
      My current sig uses this "trick".

      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      And besides japhy's sig, many other obfuscations have made use of this a long time ago - just dig around the section.

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://184996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found