Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What is wrong here (Replacing Strin pieces)

by rjt (Deacon)
on Jul 16, 2013 at 11:22 UTC ( #1044558=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.012;
    
    my $string = "---------xxxxxxxxxxxxxxx------yyyyyyyyyyyyyy--------";
    say $string;
    $string =~ s/(\A\-+|\-+$)/'?' x length $1/eg;
    say $string;
    
  2. or download this
    ---------xxxxxxxxxxxxxxx------yyyyyyyyyyyyyy--------
    ?????????xxxxxxxxxxxxxxx------yyyyyyyyyyyyyy????????
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044558]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2017-02-20 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (302 votes). Check out past polls.