Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-06-13 15:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.