Thread umschreibung: HTML::Template (17 answers)
Opened by nurri at 2005-06-08 22:22

Strat
 2005-06-16 16:24
#5089 #5089
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
my @files = glob("*.jpg");
my $width = 3;

my @images = ();

for my $i (0..$#files) {
 if ($i % $width == 0) { # new row, append to dimension X
   push (@images, { schleifeY => [ { inhalt => $files[$i] } ] } );
 }
 else { # new column, append to dimension Y
   push (@{ $images[-1]->{schleifeY} }, { inhalt => $files[$i] } );
 } # else
} # for

$template->param(schleifeX => \@images);

nicht getestet\n\n

<!--EDIT|Strat|1118931484-->
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/

View full thread umschreibung: HTML::Template