in reply to Array error!

Giving your code the once-over, I can imagine that GetInfDataFiles is being called with no parameter, or a parameter that is undef. May I suggest inserting
unless ($path) {die "empty or no parameter passed to GetInfDataFiles!" +}

As you say you're a total newbie, I'll point out that unless is one of perl's cooler control structures; it's the complement to if -- it tests for falseness, where if tests for truth. For this type of test using if, you'd need to write
if (! $path) {die "empty or no parameter passed to GetInfDataFiles!"}

and I think the negation inside the if isn't too much clearer than the unless.
OK, so now that you know the unless will only execute when its fails, whenever your sub dies like this, you'll know that the $code was blank.

Replies are listed 'Best First'.
(ar0n) Re: (boo)Re: Array error!
by ar0n (Priest) on May 02, 2001 at 10:40 UTC
    Ack! Please don't do this. I have to work with this kind of syntax on a daily basis and it really isn't nice, considering there are so much more cleaner ways of doing this. This is Perl, after all ;)
    my $path = shift or die "No path passed to GetInfDataFiles\n"
    or even:
    my $path = shift; die "No path passed to GetInfDataFiles\n" unless $path;


    ar0n ]