Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: chop is chopping off the last letter

by plaid (Chaplain)
on Jul 05, 2000 at 23:51 UTC ( [id://21209]=note: print w/replies, xml ) Need Help??


in reply to chop is chopping off the last letter

I don't quite understand your question. You're chopping a variable, but you don't want it to chop off the last letter? If you don't want it to chop off the last letter, then why are you chopping at all? The way to fix it would just be to not chop.

If what you want is to get rid of any trailing newlines, but not do anything if there aren't any, take a look at chomp, which is a more intelligent version of chop.

  • Comment on Re: chop is chopping off the last letter

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found