πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #14210

Re: perl en mysql vraagje

#14210
From: John Bokma
Date: Sun, 25 Mar 2001 03:27
27 lines
2163 bytes
Lieven Marchand wrote in message ...
>RenοΏ½ Pijlman <rpijlman@spamcop.net> writes:
>
>> Lieven Marchand <mal@wyrd.be> schreef:
>> >Ik heb het zelf niet gedraaid maar als ze $#rows aantal rijen hebt en
>> >je begint van 0 te nummeren gaan die van 0 tot $#rows-1.
>>
>> Dit was ook mijn eerste gedachte, maar Perl blijft een taal vol
>> verrassingen: $#rows geeft niet het aantal elementen in de array, maar
>> de hoogste index. Zie
>> http://www.perl.com/pub/doc/manual/html/pod/perldata.html#Variable_names.
>> Het loopen <= $#rows is dus toch goed.
>
>Ik herinner mij weer levendig waarom ik naar Python overgeschakeld
>ben.

Hoezo? $#rows is hoogste index, @rows in scalar context is aantal elementen.
Is gewoon een kwestie van de taal begrijpen :-)

John


--
Castle Amber - Software Development
Perl / Java / C / C++ developer *available*
email john@castleamber.co.nz for more info
or visit http://castleamber.co.nz/
Technical Details
Message-ID: <99jole$72f$1@lust.ihug.co.nz>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-xfer.nuri.net!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail
References: <99fsr9$6np$1@mykenos.hogent.be> <m3ofus75o9.fsf@localhost.localdomain> <mgknbtg88in5pbtp5v4br1p5t88spb9mpe@4ax.com> <m366gznmqh.fsf@localhost.localdomain>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII
X-Google-Thread: 107324,c92c20c634f97d57
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,c92c20c634f97d57
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2001-03-24 19:34:06 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-xfer.nuri.net!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail
From: "John Bokma" <postmaster@castleamber.co.nz>
Newsgroups: be.comp.programming,nl.comp.programmeren
Subject: Re: perl en mysql vraagje
Date: Sun, 25 Mar 2001 15:27:11 +1200
Organization: Castle Amber
Lines: 29
Message-ID: <99jole$72f$1@lust.ihug.co.nz>
References: <99fsr9$6np$1@mykenos.hogent.be> <m3ofus75o9.fsf@localhost.localdomain> <mgknbtg88in5pbtp5v4br1p5t88spb9mpe@4ax.com> <m366gznmqh.fsf@localhost.localdomain>
Reply-To: "John Bokma" <john@castleamber.co.nz>
NNTP-Posting-Host: p425-tnt7.akl.ihug.co.nz
X-Trace: lust.ihug.co.nz 985490926 7247 203.173.207.171 (25 Mar 2001 03:28:46 GMT)
X-Complaints-To: abuse@ihug.co.nz
NNTP-Posting-Date: Sun, 25 Mar 2001 03:28:46 +0000 (UTC)
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3