Great Circle Associates Majordomo-Users
(July 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: 'Invalid archive dir' probs, Cont'd
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Wed, 24 Jul 1996 08:34:07 -0500 (CDT)
To: mjames @ xicom . com (Michael S. James)
Cc: majordomo-users @ greatcircle . com
In-reply-to: <Pine.LNX.3.91.960724080327.7593A-100000@noah.xicom.com> from "Michael S. James" at Jul 24, 96 08:18:58 am
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Michael S. James writes: ]
> 
> [snip]
> undef $valid_dir;
> foreach $dir (@archive_dirs) {
>     if ($dir eq $dirname) {
>         $valid_dir = $dirname;
>         last;
>     }
> }
> 
> if (!$valid_dir) {
>     &abort("Invalid archive directory.  Aborting. ($dir)=dir & \ 
> 						  ^^^^^^^^^^^^
>        ($dirname)=dirname\n"); 
>        ^^^^^^^^^^^^^^^^^^	
> [snip]
[...]
> Now my questions.
> 
> 1.  What is $dir supposed to be reading?  I figure it's upposed to be 
> reading a directory path because it's be compared to another directory path.
> 
> 2.  If it's supposed to be reading a directory path, how come it has no 
> value or contents?

$dir has no value at the point you're dumping it because it's localized
for the 'foreach' loop and has no value outside that loop. Assign it to
a variable that is visible outside the loop and use that variable in the
abort message.

-- 
 Dave Wolfe    *Not a spokesman for Motorola*
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598


Follow-Ups:
References:
Indexed By Date Previous: Re: 'Invalid archive dir' probs, Cont'd
From: Mario Storti <mstorti@galileo.unl.edu.ar>
Next: Re: 'Invalid archive dir' probs, Cont'd
From: "Michael S. James" <mjames@xicom.com>
Indexed By Thread Previous: Re: Unsubscribing doubly subscribed users.
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Next: Re: 'Invalid archive dir' probs, Cont'd
From: "Michael S. James" <mjames@xicom.com>

Google
 
Search Internet Search www.greatcircle.com