Hi Martin,

On Wed, 08 Aug 2012 11:44:10 +0200
"Martin Barth" <mar...@senfdax.de> wrote:

> Hello Everyone,
> 
> I am slightly confused...
> 
> I've got a Centos 6.3 Installation with its perl (version 5.10.1) and
> i am Using the Module List::MoreUtils which comes with the Linux
> Distribution.
> 
> [root@bach perl-lib]# cd /tmp/
> [root@bach tmp]# perl -MList::MoreUtils -MData::Dumper -wle 'print
> Dumper List::MoreUtils::minmax(1..4)'
> $VAR1 = 1;
> $VAR2 = 4;
> 
> [root@bach tmp]# perl -MList::MoreUtils -MData::Dumper -wle 'print
> Dumper List::MoreUtils::minmax(1)'
> Use of uninitialized value in subroutine entry at -e line 1.
> $VAR1 = undef;
> $VAR2 = 1;
> 
> So I looked at the Sources of MoreUtils.pm and checked the minmax
> function. (BTW: Its version 0.22 of the Module) ->
> http://pastebin.com/Y7BB0e45
> 

perl-5.10.1 is very old and no longer actively maintained. There's already
perl-5.16.0. List::MoreUtils is at version 0.33: 
https://metacpan.org/release/List-MoreUtils .

Your original snippet works fine for me:

perl -MList::MoreUtils -MData::Dumper -wle 'print Dumper 
List::MoreUtils::minmax(1)'
$VAR1 = 1;
$VAR2 = 1;

Note that List::MoreUtils has both XS and pure-Perl versions of its routines,
and it is possible there is still a bug in the pure-Perl version. Anyway,
on Red Hat-based distribution, the general recommendation is to use something
like perlbrew:

http://perlbrew.pl/

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
First stop for Perl beginners - http://perl-begin.org/

<danderson> “We are NO LONGER the knights who say ‘BitKeeper’. We are now
the knights who say ‘git, git, git, cogito — Linus!’.”

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to