in reply to Re^4: perl installation failed, need help
in thread perl installation failed, need help

perl-5.20.1 is successfully installed.

$ perl -v

This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux>

Copyright 1987-2012, Larry Wall

I noticed something interesting: when I did perl -v it came out as perl-5.16.0 but when I went to /user/bin/ this is what I got when I typed ls.

when I typed which perl, here's the output: /home/deafskeptic/perl5/perlbrew/perls/perl-5.16.0/bin/perl

pdftops cpanp-run-perl pdftotext cpp pdfunite cpp-4.8 peekfd c_rehash perl crontab perl5.18.2 csplit perlbug ctags perldoc ctags.emacs24 perldoc.stub ctstat perlivp cups-calibrate perlthanks cupstestdsc pf2afm cupstestppd pfbtopfa curl pftp cut pg

As you can see here, numbers don't match.

Anyway, when I typed which perl, here's what I got:

cd /home/deafskeptic/perl5/perlbrew/perls/ $ ls perl-5.16.0 perl-5.20.1

I wrote a program that has never worked for me in any version of perl in this OS.

I don't know if it's related but it's worth a try. Here goes:

#!/usr/bin/env perl or #!/usr/bin/perl @lines = `perldoc -u -f atan2`; foreach (@lines) { s/\w<([^>]+)>/\U$1/g; print;}

I've tried use MATH::TRIG::TAN; Math::Trig::Tan; Math::Trig::tan, Math::Trig; Math::Trig ':tan'; and even the sub routines and noting works.

I was able to get this to work in Linux mint 12 but I have never been able to get this program to work with this current version of Linux.

I am wondering if I need to do a clean install of Linux to get this to work.

here's the most common output that I got running this program:

=over 8 =item atan2 Y,X ATAN2 ARCTANGENT TAN TANGENT =for Pod::Functions arctangent of Y/X in the range -PI to PI Returns the arctangent of Y/X in the range -PI to PI. For the tangent operation, you may use the MATH::TRIG::TAN function, or use the familiar relation: sub tan { sin($_[0]) / cos($_[0]) }/\U$1/g; print; } The return value for ATAN2(0,0) is implementation-defined; consult your atan2(3) manpage for more information. I think this may be the problem: Portability issues: PERLPORT/ATAN2. =back

I get the same results with use diagnostics pragma.

Using #!/usr/bin/env perl seems to work just fine – as long as I don't have anything to do with atan2.

Replies are listed 'Best First'.
Re^6: perl installation failed, need help
by Corion (Patriarch) on Oct 05, 2014 at 20:03 UTC
    #!/usr/bin/env perl or #!/usr/bin/perl

    Why do you use these instead of specifying the exact Perl version you want to run?

    Just use

    #!/home/deafskeptic/perl5/perlbrew/perls/perl-5.20.1/bin/perl -w

    That way you are explicit about the Perl version.

    You will have to (re)install all Perl modules with the new Perl version.

      I wasn't certain if that was the correct path to use.

Re^6: perl installation failed, need help
by karlgoethebier (Abbot) on Oct 05, 2014 at 18:17 UTC

    What does perlbrew list say?

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      perl-5.16.0 perl-5.20.1
        perl-5.16.0 perl-5.20.1

        I don't believe this ;-)

        It should show a list like this:

        karl@host:~$ perlbrew list perl-5.16.0 * perl-5.20.1

        The asterisk indicates the currently used Perl.

        What is your active Perl version according to perlbrew?

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»