Sara has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: chdir in perl
by PodMaster (Abbot) on Jul 08, 2002 at 17:15 UTC
    You're committing a cardinal sin, you're calling a function and not checking for success/failure.
    chdir 'x:' or die "Something's wrong, couldn't chdir to x: ($!)";
    Now, slap a slash on that chdir and you're all right.
updquery is suspicious
by cebrown (Pilgrim) on Jul 08, 2002 at 17:36 UTC
    I think the chdir is working OK (though I agree you should check for success or failure).

    Rather -- what is updquery? My guess is that when you run it, it is relying on something from the runtime environment that's not there. If you print the results of the updquery call, as below, perhaps you'll get some feedback from it to help you.

    print `updquery -sdate 26-june-2002.02:00:00 -edate 02-july-2002.00:00 +:00 -brtype golden -status closed`;
Re: chdir in perl
by Aristotle (Chancellor) on Jul 08, 2002 at 17:27 UTC
    Nitpick: rather than use backticks in void context (ie throwing away the result), use perlfunc:system. system qw(updquery -sdate 26-june-2002.02:00:00 -edate 02-july-2002.00:00:00 -brtype golden -status closed); ____________
    Makeshifts last the longest.
Re: chdir in perl
by marvell (Pilgrim) on Jul 08, 2002 at 17:00 UTC
    If this were Unix, I'd assume you needed . (dot) in your PATH. Does Windows have a similar requirement?

    --
    Steve Marvell

        I was implying you might need it to make it work in context, not that it was a good idea. I don't have dot in my path and not does root.

        --
        Steve Marvell