Viki@Stag has asked for the wisdom of the Perl Monks concerning the following question:
What ever drive I put at the end of list @drives2check the script hangs there. I dont understand why this is happening, any help ...my @drives2check = ('S:/','T:/','X:/','D:/'); my @dis_drives = (); foreach my $drive (@drives2check) { print "Checking $drive\n"; opendir (DRIVE, $drive) or do { push @dis_drives, $drive; print "$drive : $!\n"; next; }; close DRIVE; } if (scalar @dis_drives) { # Mail the list of disconnected drives }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking status of Network Mapped Drives
by AltBlue (Chaplain) on Aug 04, 2008 at 10:59 UTC | |
|
Re: Checking status of Network Mapped Drives
by pjotrik (Friar) on Aug 04, 2008 at 08:27 UTC | |
by Anonymous Monk on Aug 04, 2008 at 08:52 UTC | |
|
Re: Checking status of Network Mapped Drives
by cdarke (Prior) on Aug 04, 2008 at 08:21 UTC | |
|
Re: Checking status of Network Mapped Drives
by Bloodnok (Vicar) on Aug 04, 2008 at 14:31 UTC |