Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to trim a line from leading and trailing blanks without using regex or non-standard modules

by hippo (Chancellor)
on Aug 14, 2020 at 06:46 UTC ( #11120710=note: print w/replies, xml ) Need Help??


in reply to How to trim a line from leading and trailing blanks without using regex or non-standard modules

without resorting to regular expressions (which are definitely an overkill for this particular purpose)?

Sure, just write your own function to do it. Having written that you will then come to the conclusion that regular expressions are definitely not an overkill for this particular purpose.

This is clearly an important special case. ... which clearly is an abuse of regex.

You keep using that word. I don't think it means what you think it means.


🦛

  • Comment on Re: How to trim a line from leading and trailing blanks without using regex or non-standard modules

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2020-09-18 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (113 votes). Check out past polls.

    Notices?