403Webshell
Server IP : 216.92.14.13  /  Your IP : 216.73.216.171
Web Server : Apache
System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : rmlac2fmr ( 1040637)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/man/man3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/man/man3/Class::Maker::Examples::Array.3
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Maker::Examples::Array 3"
.TH Maker::Examples::Array 3 "2003-09-09" "perl v5.22.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Array \- a complete array class
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  use Class::Maker::Examples::Array;
\&
\&        Array\->new( array => [1..100] );
\&
\&                # standard
\&
\&        $a\->shift;
\&
\&        $a\->push( qw/ 1 2 3 4 / );
\&
\&        $a\->pop;
\&
\&        $a\->unshift( qw/ 5 6 7 / );
\&
\&        $a\->reset;
\&
\&        $a\->join( \*(Aq, \*(Aq );
\&
\&                # extended
\&
\&        $a\->count;
\&
\&        $a\->get;
\&
\&        $a\->pick( 4 );
\&
\&        $a\->union( 100..500 );
\&
\&        $a\->intersection( 50..100 );
\&
\&        $a\->diff( 50..100 );
\&
\&        $a\->rand;
\&
\&        $a\->sort;
\&
\&        $a\->totext;
\&
\&        $a\->sum;
\&        
\&        $a\->unique;
\&
\&        $a\->permute;
\&
\&        print "same" if $a\->eq( $other );
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This an object-oriented array class, which uses a method-oriented interface.
.SH "METHODS"
.IX Header "METHODS"
Mostly they have the similar syntax as the native perl functions (use \*(L"perldoc \-f\*(R"). If not they are
documented below, otherwise a simple example is given.
.SS "count"
.IX Subsection "count"
Returns the number of elements (same as \f(CW@arry\fR in scalar context).
.SS "reset"
.IX Subsection "reset"
Resets the array to an empty array.
.SS "get"
.IX Subsection "get"
Returns the backend array.
.SS "pick( [step{scalar}]:2 )"
.IX Subsection "pick( [step{scalar}]:2 )"
Returns every 'step' (default: 2) element.
.SS "union"
.IX Subsection "union"
Returns the union of two arrays (Array object is returned).
.SS "intersection"
.IX Subsection "intersection"
Returns the intersection of the two arrays (Array object is returned).
.SS "diff"
.IX Subsection "diff"
Returns the diff of the two arrays (Array object is returned).
.SH "EXPORT"
.IX Header "EXPORT"
None by default.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SS "Purpose"
.IX Subsection "Purpose"
Because most methods return Array objects itself, the can be easily further treated with Array methods.
Here a rather useless, but informative example.
.SS "Code"
.IX Subsection "Code"
use Class::Maker::Examples::Array;
.PP
.Vb 1
\&        my $a = Array\->new( array => [1..70] );
\&
\&        my $b = Array\->new( array => [50..100] );
\&
\&        $a\->intersection( $b )\->pick( 4 )\->join( \*(Aq, \*(Aq );
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
Murat Uenalan, muenalan@cpan.org
.SH "SEE ALSO"
.IX Header "SEE ALSO"
perl, perlfunc, perlvar

Youez - 2016 - github.com/yon3zu
LinuXploit