Hi all.

I'm using a foreach loop to iterate through an array and print out HTML code
related to each value.
However in my HTML code I would also like to make links to the previous
array item and next array item.

The previous item is simple to do, but I'm struggling to think of a way of
getting the next item.

Can anyone give me any pointers?

Here is my snippet of code so far:

#
#  write picture page html code
#
my $prev;
foreach (@files) {
        my($start,$end) = split/\./, $_;
        open PICPAGE, ">$dir\/$start.html" or die "Can't open: $!";
        print PICPAGE print_pic_page($_, $prev, 'next');
        close PICPAGE;
        $prev = "$dir\/$start.html"
}


Thanks.

----------------------------------------------------------------------------
--------------------------
**apologies for the below disclaimer. It's tagged on at the mail server.**
----------------------------------------------------------------------------
--------------------------


************************************************************************
The information contained in this message or any of its
attachments is confidential and is intended for the exclusive
use of the addressee. The information may also be legally
privileged. The views expressed may not be company policy,
but the personal views of the originator. If you are not the
addressee, any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited.
If you have received this message in error, please contact
[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]> and then delete this message. 

Exide Technologies is an industrial and transportation battery
producer and recycler with operations in 89 countries.
Further information can be found at www.exide.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to