Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: The Lone Right Bracket

by btrott (Parson)
on Jul 26, 2000 at 08:46 UTC ( [id://24412]=note: print w/replies, xml ) Need Help??


in reply to The Lone Right Bracket

Well, it breaks because the /e modifier means, evaluate the right-hand side of this substitution as Perl code. And that's not valid Perl code. But you may have already known that.

Did you try running it through B::Deparse? This is what you get:

$words = 'This%is%Devious'; $words =~ s/%/do { () }/eg; $words =~ s/ /do { %} }\n/eg; print "$words\n";
Of course, this isn't valid code either, nor is the original with the ending curly brace. :) But apparently you're tricking the parser into recognizing it as valid. Very odd...

Some wonderful opportunities for obfuscation may lie down this path, it seems. :)

Replies are listed 'Best First'.
RE: Re: The Lone Right Bracket
by Anonymous Monk on Jul 27, 2000 at 09:36 UTC
    How exactly do I run a program through B::Deparse? Is there a command line flag?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-25 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found