in reply to Perl on Windows 2008 R2
That sounds like a path issue. If you're wanting cygwin to use your Strawberry perl and not the other perl, then in your .bashrc or .bash_profile you can remove the other vendor's bin directories from your PATH. For example, at $work, I needed to edit the PATH, so I put this in my .bashrc:
#20110309 - Remove irrelevent entries from $PATH PATH=`bin/path_filter.pl` PATH=$PATH:~/bin export PATH
And then in my local bin directory, I put in a little script to patch up PATH as I wanted. (I didn't use anything fancy, so it doesn't matter which perl you run it under.
#!/usr/bin/perl # # path_filter.pl - parse the PATH variable, and return a new path str +ing with all # the duplicates removed, and any entries in the IGNORE hash removed. # # Win/DOS doesn't care much about case sensitivity, so we'll map ever +ything to lower # case on storage so we can remove dups in different cases (specifica +lly for the # case of C:\Windows\System32 vs C:\Windows\system32) # # 20110309 roboticus use strict; use warnings; my $DBG=0; my %IGNORE = map { lc($_)=>0 } ( "/DOS/c/Program Files/TortoiseSVN/bin", "/DOS/c/Program Files/QuickTime/QTSystem", "/DOS/c/WINDOWS/system32/WindowsPowerShell/v1.0", . . . snip! . . . # WBEM=Web-Based Enterprise Management (WMI), not likely neede +d in Cygwin "/DOS/c/WINDOWS/System32/Wbem", ); my %DUP = (); my @Path = split /:/, $ENV{PATH}; my @NewPath = (); for my $dir (@Path) { if (! -d $dir) { print STDERR "MISSING: $dir\n" if $DBG; } elsif (exists $IGNORE{lc $dir}) { ++$IGNORE{$dir}; print STDERR "IGNORED: $dir\n" if $DBG; } elsif (exists $DUP{lc $dir}) { print STDERR "DUP: $dir\n" if $DBG; ++$DUP{lc $dir}; } else { print STDERR "ADDED: $dir\n" if $DBG; $DUP{lc $dir}=0; push @NewPath, $dir; } } # Output the new PATH variable print join(":", @NewPath);
Once you fix that, though, you may find another annoyance. (I'd be more specific, but it's been a while since I tried using Strawberry perl in a cygwin environment. I think it was some directory name translation issues, but I don't remember for certain.)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|