Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Refactoring challenge.

by BrowserUk (Patriarch)
on Mar 06, 2005 at 18:32 UTC ( [id://437071]=note: print w/replies, xml ) Need Help??


in reply to Re: Refactoring challenge.
in thread Refactoring challenge.

$str =~ s[^.{$pos1}\s*][];

removes $pos1 characters from the front of the string, plus (optionally) any whitespace that immediately follows them. Not complicated but necessary.

As for the unit tests, that would require I publish several hundred lines of support code, which would be a bit much to expect any to look through.

Otherwise, I'd be left making educated guesses. That might work, or it might not.

Fair enough. I wasn't asking for a perfect working solution, just some fresh ideas to set me on my way, which dragonchild and hv both gave me.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (None)
    As of 2024-04-19 00:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found