in reply to itterator variable in a LWP-UA-code snippet

You've shown start and end range as ...school=01 and ...school=10000 so you'll want to loop through (1 .. 10000), not (0 .. 10000).

I'm not sure what's happening with your sprintf - you're going to end up with the range: ...school=5503,0 to ...school=5503,10000.

You'll want the remove the 5503, part. Then you'll need %02d while $i < 10 - after that I'm not sure: is 10-99 represented like that or do they have leading zeros? Anyway, you can probably work it out from there.

-- Ken

Replies are listed 'Best First'.
Re^2:itterator variable in a LWP-UA-code snippet
by Perlbeginner1 (Scribe) on Oct 31, 2010 at 12:21 UTC
    hello Ken; hello Anonymous Monk -thx for the reply!

    @ken: guess that you are right want to loop through (1 .. 10000), not (0 .. 10000).


    i am going to try it out with

    %02d while $i < 10

    i come back and report all my findings

    regards beginnner

    update

    String concatenation:

    #!/usr/bin/env perl use 5.12.0; use warnings; use LWP::Simple; use Data::Dumper; say Dumper({ map { $_ => eval { get 'http://example.com/'.$_ }, } 0..1 +000 });


    i try this out! thx.
    i come back and report