Re: FindBin cannot chdir back problem



"Gunnar Hjalmarsson" <noreply@xxxxxxxxx> wrote in message
news:3jj5rnFqbdkuU1@xxxxxxxxxxxxxxxxx
> bri@xxxxxxxxxxx wrote:
>> We have Perl 5.6.1 installed. We're getting the message:
>>
>> Cannot chdir back to
>> M:/MyComp_R16/Manufacturing/ToolsData/VisualStudioNet: No such file
>> or
>> directory
>
> <snip>
>
>> This script worked when we had Visual Studio 6 installed but now
>> fails
>> since we installed Visual Studio.NET. It is called from within
>> Visual
>> Studio.
>>
>> Any suggestions where to start looking to figure out how to fix this?
>
> The code?
>
Here is a code snippet from my script that calls FindBin:

#!/bin/perl
use strict;
use File::Basename;
use Getopt::Long;
use Cwd;
use Cwd 'abs_path';
require 5.6.1;

# ------------------------------------------------
$ENV{PATH} = my $UT_MYPATH = my $UT_CCPATH = "";
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};

# In the original script, the following line is line 101
use FindBin qw($Bin);
BEGIN { # Untaint $Bin
if ( "$Bin" =~ /^(.*)$/ ) { $Bin = $1; } else { die "Tainted
Bin\n";};
}
use lib ("${Bin}/perllib","${Bin}/../perllib");

require 'bvb_include_common.pl';
bvb_set_PATH($Bin, $BVBDEBUG); # Set PATH to min. system libs

exit(0);

Brian Bygland


.



Relevant Pages

  • Re: FindBin cannot chdir back problem
    ... > Here is a code snippet from my script that calls FindBin: ... > use strict; ... > use Cwd 'abs_path'; ...
    (comp.lang.perl.modules)
  • What directory perl script is being run from? - followup
    ... Cwd didn't work because it gives what directory ... Can't get FindBin to work..any idea what's wrong with the following? ... normally..just doing a quick hack to someone else's script! ...
    (comp.lang.perl)
  • Re: FindBin cannot chdir back problem
    ... >> Here is a code snippet from my script that calls FindBin: ... >> use Cwd; ... > compile time - in which case, just about all the code that you have ...
    (comp.lang.perl.modules)
  • Re: Visual Basic and JavaScript
    ... Response is server-side object and judging from the code snippet you place ... it in client script blocks. ... > decided to do a small portion of my DW app in VB, ...
    (microsoft.public.vsnet.general)
  • RE: Streaming javascript and XP Service Pack 2
    ... Thanks for your posting. ... tests based on your description and the code snippet you provided. ... it seems that the script can run correctly on my side. ... #Scripts may not run on a local HTML Web page that references .htc or .xml ...
    (microsoft.public.dotnet.framework.aspnet)