Re: Comparing array elements with scalar variables.

2002-10-30 Thread Josimar Nunes de Oliveira
Try this code: use Time::Local; $date = time(); for ($i=0;$i<6;$i++){ my $thisMonth = uc(substr(localtime($date - $i*(31 * 24 * 60 * 60)),4,3)); print "$thisMonth\n"; } Will this help you? Josimar - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wedne

RE: Comparing array elements with scalar variables.

2002-10-30 Thread jonathan . musto
etters@;rivalsdm.com] Sent: Wednesday, October 30, 2002 09:59 To: Musto,J,Jonathan,IVYD3 C Cc: [EMAIL PROTECTED] Subject: Re: Comparing array elements with scalar variables. On Wed, 2002-10-30 at 09:33, [EMAIL PROTECTED] wrote: > I've have some code that prints a column of a database table into

Re: Comparing array elements with scalar variables.

2002-10-30 Thread Nigel Wetters
On Wed, 2002-10-30 at 09:33, [EMAIL PROTECTED] wrote: > I've have some code that prints a column of a database table into a html > form. The column of the table is just the last 6 months of the year: see previous post database lookups are expensive. the last 6 months of the year are fairly const

Re: Comparing array elements with scalar variables.

2002-10-30 Thread Nigel Wetters
On Wed, 2002-10-30 at 09:33, [EMAIL PROTECTED] wrote: > my @emonth; > while ( @emonth = $end_Months->fetchrow_array()) { > print HTML "@emonth\n"; > } Grab the month from the database row before writing the line: while ( my @row = $sth->fetchrow_array()) { my $month = $row[0]; # first colum