Le dim 09/11/2003 à 20:02, drieux a écrit : > On Sunday, Nov 9, 2003, at 09:24 US/Pacific, lanzaroto wrote: > > Le dim 09/11/2003 à 17:44, drieux a écrit : > > > >> On Sunday, Nov 9, 2003, at 08:08 US/Pacific, lanzaroto wrote: > >> > >>> > >>> while({$id, $nom, $prenom, $email} = > >>> $STH->fetchrow_array){ > >>> > >>> $REQ->Tr, > >>> $REQ->td('$id'), > >>> $REQ->td('$nom'), > >>> $REQ->td('$prenom'), > >>> $REQ->td('$email'), > >>> $REQ->$id++; > >>> } > >>> ), > >> > >> is this the 'while' at or near line 90? > > > > yes > > is there a reason that you have them in the form > > '$var' > > vice say > > $var > > eg: > > $REQ->td($id), > > since the single tick will prevent 'expansion' and hence pass > a literal string there?
No , but before this mail I made a lot of tests. > > There is also the odd bit that you doing an interative loop > in the middle of a print statement. Hence I would split that up > into three print statements > > stuff before the while loop, > the while loop printing > stuff after the while loop. OK,it's a good idea but I am not sur to understand all you write me, I am doing this script to learn howw to it Normaly This script is going to be the admin of mysql base of a website, > > attached below find some play code, and IF you can help me > with how i would be able to do a > > print "some stuff here", while(...){....}, "some other stuff"; > > then you clearly will have coolness. > Thank you but I prefere do it by myself, to understand what I am doing, the target is to improve myself in Perl CGI Thank you Lanzaroto > --- > > my $req = Foobar::foobar(); > > $req->fill_foobar(junk_me()); > > while ( my ( $id, $thing, $third, $forth) = $req->fetch()) > { > print "$id, $thing, $third, $forth \n"; > #"\t$id, $thing, $third, $forth \n"; > > }; > > > sub junk_me { > [ > [qw/a b c d/], > [qw/e f g h/], > [qw/i j k l/], > [qw/bob ted carol alice/] > ]; > } > > package Foobar; > > #------------------------ > # > sub foobar { > > my $hash = {}; > bless $hash, "Foobar"; > > } # end of foobar > > #------------------------ > # > sub fill_foobar > { > my ($me, $array_oh_array) = @_; > > $me->{max} = @$array_oh_array; > $me->{count} = 0; > $me->{stuff} = $array_oh_array; > > } # end of fill_foobar > > #------------------------ > # > sub fetch > { > my ($me) = @_; > > my @array; > if ($me->{count} < $me->{max} ) > { > @array = @{${$me->{stuff}}[$me->{count}++]}; > > } else > { > $me->{count} = 0; > > } > > return @array; > > } # end of fetch > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]