Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

$1[

by rsFalse (Chaplain)
on Oct 10, 2017 at 19:35 UTC ( [id://1201114]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    s/\)([^()]+)\(/]$1[/g;
    
    print scalar reverse y/][/)(/r;
    
  2. or download this
    syntax error at ./bracket.pl line 13, near "y/][/)(/r;"
    Execution of ./bracket.pl aborted due to compilation errors.
    
  3. or download this
    s/\)([^()]+)\(/]$1\[/g; # '[' is not a metachar here
    
  4. or download this
    s/\)([^()]+)\(/]${1}[/g; 
    # to surround the whole variable name which is interpreted inside a st
    +ring
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1201114]
Approved by holli
Front-paged by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found