Without seeing anything of the output, it's hard to diagnose.
But you seem to be trying to install over the perl binary supplied by your OS vendor. The general advice is against doing that, as the system perl should only be managed through the system package manager. Manually modifying the system Perl can render your system tools unworkable and will cause conflicts between your OS package manager and CPAN when binary packages are changed.
The general approach is to install your version under /opt/perl/ or /opt/perl-5.20/ and set the path in your Perl scripts appropriately. Alternatively, consider looking at perlbrew, which automates installing (yet) another version of Perl on your system.
| [reply] [d/l] [select] |
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. | [reply] [d/l] |
#!/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. | [reply] [d/l] [select] |
| [reply] [d/l] |