3 ms·
Hell! just copy-paste it raher than adding a dependency.
by spdionis 11y ago
Hell! just copy-paste it raher than adding a dependency.
- collyw 11y agoI spent many years programming Perl, which had no trim / strip funtcion to get rid of whitespace. The Perl cookbook has a recipe for one using a regxeg, and I have cut and pasted that into many other places. It always felt wrong cutting and pasting the same thing over and over, but it was never large enough for me to consider putting it in a package either.
- justinator 11y ago> but it was never large enough for me to consider putting it in a package either. That's OK, someone did it for you: https://metacpan.org/pod/Text::Trim https://metacpan.org/pod/Text::Trim CPAN to the rescue!