in reply to using pagecount variable in array?
Something in my syntax isn't working (and I'm not seeing it!)
We're not seeing it either, if you don't show us! What exactly ARE you getting? When I added:
use strict; use warnings;
at the top of the program, and assigned a value to $total_recs (since I have no idea what value you are starting with):
my $total_recs = 123;
and changed for $i (@pages) to for my $i (@pages), I got the output:
Page 1 of <a href="http://www.example.com/page1.shtml">http://www.exam +ple.com/pa ge1.shtml</a><br> <a href="http://www.example.com/page2.shtml">http://www.example.com/pa +ge2.shtml< /a><br> <a href="http://www.example.com/page3.shtml">http://www.example.com/pa +ge3.shtml< /a><br> <a href="http://www.example.com/page4.shtml">http://www.example.com/pa +ge4.shtml< /a><br> <a href="http://www.example.com/page5.shtml">http://www.example.com/pa +ge5.shtml< /a><br> <a href="http://www.example.com/page6.shtml">http://www.example.com/pa +ge6.shtml< /a><br> <a href="http://www.example.com/page7.shtml">http://www.example.com/pa +ge7.shtml< /a><br> <a href="http://www.example.com/page8.shtml">http://www.example.com/pa +ge8.shtml< /a><br> <a href="http://www.example.com/page9.shtml">http://www.example.com/pa +ge9.shtml< /a><br> <a href="http://www.example.com/page10.shtml">http://www.example.com/p +age10.shtm l</a><br> <a href="http://www.example.com/page11.shtml">http://www.example.com/p +age11.shtm l</a><br> <a href="http://www.example.com/page12.shtml">http://www.example.com/p +age12.shtm l</a><br>
which looks fine to me. It's the output for each page from 1 to 12 (as 123 / 10 = 12.3).
Please explain exactly what YOU are getting, and why you think it's wrong.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using pagecount variable in array?
by bobafifi (Beadle) on Jul 23, 2006 at 14:26 UTC | |
by davido (Cardinal) on Jul 23, 2006 at 16:17 UTC | |
by liverpole (Monsignor) on Jul 23, 2006 at 17:43 UTC | |
by bobafifi (Beadle) on Jul 23, 2006 at 17:56 UTC | |
by CountZero (Bishop) on Jul 23, 2006 at 18:32 UTC | |
by Ieronim (Friar) on Jul 23, 2006 at 18:42 UTC | |
by CountZero (Bishop) on Jul 23, 2006 at 19:21 UTC | |
by mrborisguy (Hermit) on Jul 23, 2006 at 15:29 UTC | |
by bobafifi (Beadle) on Jul 23, 2006 at 17:47 UTC |