Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Tie::Array::Sorted::Lazy

Name Tie::Array::Sorted::Lazy
Version
Located at /usr/share/perl5
File /usr/share/perl5/Tie/Array/Sorted/Lazy.pm
Is Core No
Search CPAN for this module Tie::Array::Sorted::Lazy
Documentation Tie::Array::Sorted::Lazy
Module Details Tie::Array::Sorted::Lazy

NAME

Tie::Array::Sorted::Lazy - An array which is kept sorted


SYNOPSIS

        use Tie::Array::Sorted::Lazy;
        tie @a, "Tie::Array::Sorted::Lazy", sub { $_[0] <=> $_[1] };
        push @a, 10, 4, 7, 3, 4;
        print "@a"; # "3 4 4 7 10"


DESCRIPTION

This is a version Tie::Array::Sorted optimised for arrays which are stored to more often than fetching. In this case the array is resorted on retrieval, rather than insertion. (It only re-sorts if data has been modified since the last sort).

        tie @a, "Tie::Array::Sorted::Lazy", sub { -s $_[0] <=> -s $_[1] };

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026