Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: installing perl 5.12.3

by Anonymous Monk
on Apr 21, 2011 at 09:44 UTC ( [id://900546]=note: print w/replies, xml ) Need Help??


in reply to installing perl 5.12.3

Run this program and add the output to your .bashrc or .bash_profile or autoexec.bat
#!/usr/bin/perl -- use strict; use warnings; use Config; Main( @ARGV ); exit( 0 ); sub Main { my $sep = $Config{path_sep}; my $pat = 'export PATH=%s$PATH'; $pat = 'set PATH=%s%%PATH%%' if $sep eq ';' ; printf "$pat\n", join $sep, ( uniq( grep length, grep defined, map { $Config{$_} } qw' installsitebin installvendorbin installbin ' ), ), ''; } sub uniq (@) { my %seen = (); grep { not $seen{$_}++ } @_; } __END__
The output looks like
export PATH=/usr/bin:$PATH
or
set PATH=c:\perl\5.12.2\bin\MSWin32-x86-multi-thread;c:\perl\site\5.12 +.2\bin;c:\perl\5.12.2\bin;%PATH%

It is based on
$ perl -V:installsitebin -V:installvendorbin -V:installbin -V:insta +llsitescript -V:installvendorscript -V:installscript installsitebin='c:\perl\5.12.2\bin\MSWin32-x86-multi-thread'; installvendorbin=''; installbin='c:\perl\5.12.2\bin\MSWin32-x86-multi-thread'; installsitescript='c:\perl\site\5.12.2\bin'; installvendorscript=''; installscript='c:\perl\5.12.2\bin'; $ perl -V:installsitebin -V:installvendorbin -V:installbin -V:insta +llsitescript -V:installvendorscript -V:installscript installsitebin='/usr/bin'; installvendorbin='/usr/bin'; installbin='/usr/bin'; installsitescript='UNKNOWN'; installvendorscript='UNKNOWN'; installscript='/usr/bin';

Replies are listed 'Best First'.
Re^2: installing perl 5.12.3
by rob171171 (Acolyte) on Apr 21, 2011 at 09:51 UTC

    which bashrc should I edit?

    [root@Gandalf bin]# find / -name bashrc /root/perl5/perlbrew/etc/bashrc /etc/bashrc /usr/share/doc/bash-3.2/startup-files/bashrc
      The one in your home directory, i've seen .profile, .inputrc, .bashrc ...
Re^2: installing perl 5.12.3
by Anonymous Monk on Apr 21, 2011 at 09:53 UTC
    Bah, that should be
    #!/usr/bin/perl -- use strict; use warnings; use Config; Main( @ARGV ); exit( 0 ); sub Main { my $sep = $Config{path_sep}; my $pat = 'export PATH=%s$PATH'; $pat = 'set PATH=%s%%PATH%%' if $sep eq ';' ; printf "$pat\n", join $sep, ( uniq( grep length, grep defined, map { $Config{$_} } qw' installsitebin installvendorbin installbin installsitescript installvendorscript installscript ' ), ), ''; } sub uniq (@) { my %seen = (); grep { not $seen{$_}++ } @_; } __END__

      the output od the latest code is

      export PATH=/usr/bin:$PATH

      I have added this line to both /root/perl5/perlbrew/ and etc/bashrc

      however im still seeing Perl 5.8.8

        Guys / Gals Thank you very much for your help & patience in getting me sorted. Much appreciated

        ok think I have managed to get perlbrew installing so I will let ye know how that goes

        I have also added export PATH=/usr/bin:$PATH to $HOME/bashrc

        but to no avail

        any further suggestions or recommendations on how this fool can mend his ways???

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://900546]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found