... foreach my $attribute (@attributes) { ... #### /usr/bin/perl -wT #author: Kunt Unt #Creation date: 10/06/2002 use strict; my $n=1; open (LOG, "anuncis.txt") || die "$!"; while () { chomp; my @attributes = split /\|/; print "\n"; print "Anunci número $n del $attributes[0]\n"; print "De $attributes[1] $attributes[2] que vol vendres $attributes[6] a $attributes[7] €.\n"; print "Us hi podeu posar en contacte al(s) telèfon(s) $attributes[8] // $attributes[9]\n"; print "Segons l'horari que ens indica: $attributes[5]\n"; print "O bé al correu electrònic $attributes[10] o a la seva URL $attributes[11]\n"; print "Aquests són els seus comentaris:\n"; print "

$attributes[12]

\n"; print "

\n"; $n++; } close LOG; print qq(
Retorn a la nostra pàgina principal);