Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Error with GetDRIVE() when using a mapped drive

by Loops (Curate)
on Nov 03, 2014 at 15:19 UTC ( #1105915=note: print w/replies, xml ) Need Help??


in reply to Error with GetDRIVE() when using a mapped drive

Welcome to the monastery!,

For whatever reason GetDrive is failing on your Y: drive. This means $d is left uninitialized and causes errors when you try to dereference it in the following lines. Change that GetDrive line to this:

my $d = $fs->GetDrive('Y:') or die "GetDrive failed $!";
It doesn't answer what the problem is with drive Y: on your machine.. (does it exist for sure?) but it explains what's happening in your script.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1105915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-05-24 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?