Search notes:

Perl module String::Util

use warnings;
use strict;

use String::Util 'trim';

my $string  = '   foo   bar   baz    ';
my $trimmed = trim $string;

print ">$string<\n";
print ">$trimmed<\n";


# With an ordinary regular expression:

$string =~ s/^\s+|\s+$//g;

print ">$string<\n";
Github repository PerlModules, path: /String/Util/script.pl
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107395, '3.147.80.179', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/String/Util/index(52): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78