This produces two circular links, centres at 100,100 and 200,200, with radius 50. Very roughly, something like this:#!/usr/bin/perl my @x_points = ( 100, 200 ); my @y_points = ( 100, 200 ); my @radiuses = ( 50, 50 ); my @websites = qw( http://www.yahoo.com http://www.google.com ); print q( <IMG SRC="figure.gif" USEMAP="#mymap" width="400" height="400"> <MAP NAME="mymap"> ); for ( my $i = 0 ; $i < @x_points ; $i++ ) { print qq(<AREA SHAPE="circle" COORDS="$x_points[$i],$y_points[$i],$radiuses[$i]" HREF="$websites[$i]"> ); } print q(</MAP>);
But what your code is crying out for is a nice little AoH containing all the data in a much better structure. Exercise for the reader etc.###################################################### # # # # # ###### # # ## ## # # # # # # # # <-yahoo # # # # # # ## ## # # ###### # # ###### # # ## ## # # # # # # # # <- google # # # # # # ## ## # # ###### # # # # # # # # # # # # # # # # # # # # # ######################################################
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print
In reply to Re: Creating an image map using Perl code
by Cody Pendant
in thread Creating an image map using Perl code
by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |