Search notes:

Perl module List::Gen

use warnings;
use strict;
use feature 'say';


use List::Gen '*';

# by # {{{

for my $x (every 3 => (1, 2, 3, 4, 5, 6, 7, 8, 9)) {
  say join " - ", @$x;
}
# 1 - 2 - 3
# 4 - 5 - 6
# 7 - 8 - 9

# }}}


# mapn # {{{
print "\n";
print mapn { "$_ : " . (join ' - ', @_[ 1 .. $#_ ]) . "\n" } 4 => qw(foo 1 2 3 bar 4 5 6 baz 7 8 9);
# foo : 1 - 2 - 3
# bar : 4 - 5 - 6
# baz : 7 - 8 - 9

print "\n";
# }}}

#range # {{{
my $rng = range 3, 30, 4;

say ref $rng;
# List::Gen::era::tor

print "\n";

say for @$rng;
# 3
# 7
# 11
# 15
# 19
# 23
# 27

print "\n";
$rng -> say;
# 3 7 11 15 19 23 27

print "\n";
say $rng -> str;
# 3 7 11 15 19 23 27

print "\n";

say while <$rng>;
# 3
# 7
# 11
# 15
# 19
# 23
# 27

# }}}
Github repository PerlModules, path: /List/Gen/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...', 1759391183, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/List/Gen/index(101): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78