Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-12-28 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls