VirtualBox

Ticket #4853: testunc2.pl

File testunc2.pl, 511 bytes (added by paulg_ca, 15 years ago)

test perl script

Line 
1# Manage the to-do list.
2
3# use warnings;
4# use strict;
5use Win32::NetResource; # for get_drive_path
6
7my $drive="z:";
8my $ret;
9
10print ("Calling GetUNCName $drive\n");
11if (Win32::NetResource::GetUNCName ($ret, $drive)) {
12 print ("success \$ret = $ret\n");
13 # all done
14}
15elsif ($^E == "ERROR_NOT_CONNECTED") {
16 # Not a network drive, so just return the drive letter itself.
17 $ret = $drive;
18}
19else {
20 print ("\$ret = $ret\n");
21 die "Unable to GetUNCName for $drive: $^E";
22
23}
24
25

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy