On Fri, 2002-10-11 at 05:36, Michael Fowler wrote:
> On Fri, Oct 11, 2002 at 04:16:41AM +0100, mike wrote:
> > Unfortunatel chdir does not work
>
> In what way doesn't it work? Are you getting an error? How are you
> verifying it doesn't work?
no errors but directory does not change
with use script and -ww all I get is my output from a die statement
>
> > This is the script
> >
> > #!/usr/bin/perl -ww
> > open(BLD_LIST,"buildlist");
> > my @pkg=<BLD_LIST>;
> > my $ver=$ARGV[2];
> > my $name=$ARGV[0];
> > my $release=$ARGV[1];
> > foreach my $pkg (@pkg){
> > my $dir1=$pkg;
> > use Cwd;
> > my $dir2=getcwd();
> > my $dir3="$dir2/$dir1/";
> > chdir $dir3 or die "cannot change";
> > my $dir4=getcwd();
> > print "$dir3\n"
>
> You're missing a close brace. Is there more code?
yep - missed the copy
> > the print shows the directory that I am trying to change to but chdir
> > just does not work
>
> What do you see when you print $dir4?
the previous directory ie: not changed
>
> Michael
> --
> Administrator www.shoebox.net
> Programmer, System Administrator www.gallanttech.com
> --
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Linux, Gnome what more do you need
http://www.redtux.demon.co.uk
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]