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

$1[

by rsFalse (Hermit)
on Oct 10, 2017 at 19:35 UTC ( #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
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? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2021-01-19 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?