Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Tie::CountLoop 1.5

    Download button

    No screenshots available
    Downloads: 291  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dulaunoy Fabrice | More programs
    Perl Artistic License / FREE
    March 7th, 2007, 02:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::CountLoop description

    Tie::CountLoop is a Perl module that helps you have a counter looping in a scalar with min max and increment value.

    Tie::CountLoop is a Perl module that helps you have a counter looping in a scalar with min max and increment value.

    SYNOPSIS

    use Tie::CountLoop;

    tie my $counter , 'Tie::CountLoop',15 ,-1 ,15 ,7 ,0;

    my $t = tied $counter;
    $t->increment( 1 );

    for ( 1 .. 20 )
    {
    print " n";
    }

    $t->increment( 0 );
    for ( 1 .. 20 )
    {
    print " n";
    }

    or

    use Tie::CountLoop;
    tie my $counter , 'Tie::CountLoop';

    for ( 1 .. 20 )
    {
    print " n";
    }

    Tie::CountLoop allows you to tie a scalar in such a way that it increments each time it is used. The tie takes 4 optionals extra arguments.

    Argument 1: is the start value of the counter. (default =0).
    Argument 2: is the increment value. (default = 1).
    Argument 3: is the maximal value. When this value is reached, the counter is set to the minimal value (default = (2**32) -1)

    Argument 4: is the minimal value. When this value is reached if we used an negative increment value, the counter is set to the maximal value (default = 0)

    Argument 5: is a skipping value. If set to 3, means that you could access the counter 3 time without incrementing (defualt=1)

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    counter looping | increment value | Perl module | Tie::CountLoop | counter | looping

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM