Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^4: remove first and last character of string (updated)

by flieckster (Scribe)
on Oct 15, 2020 at 00:47 UTC ( #11122847=note: print w/replies, xml ) Need Help??

in reply to Re^3: remove first and last character of string (updated)
in thread remove first and last character of string

Hi Bill, the output for the first post resulted in this:
1..1 ok 1 - Remove quotes
first off thank you for taking the time to answer my post! I appreciate any help i can get for sure. I was hoping to remove the quotes from the string only, "654321_1111" would return 654321_1111. you can see where i was confused? thank you again.

Replies are listed 'Best First'.
Re^5: remove first and last character of string (updated)
by hippo (Bishop) on Oct 15, 2020 at 08:35 UTC

    Let us assume you were confused because you weren't expecting tests.

    A piece of code which accepts input and produces output is useful to the end user, but slightly less so to the developer trying to determine if a particular requirement of the code is met or not. Since your initial description of the problem is (and continues to be) very vague it is just about impossible for us or anyone else to produce a solution which matches precisely the unknown spec.

    In such situations therefore, we produce instead a test. The test shows what output we expect for a given input, analyses the result of the code we use to try to satisfy the test and outputs the result of that test (using TAP - which is the output you have quoted here).

    Here are some pages for you to read to undestand all this:

    It may seem daunting and/or unnecessary now but it will help you a great deal in the long run.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2022-05-23 11:46 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.