Try adding pipe to open
open TASK, '-|',"net use \* \"$_[0]\"" or die "cannot map $_[0]";or alternatively
poj#!perl use strict; use warnings; use IPC::System::Simple qw/capture/; my $destination = "\\\\BLAH\\NESTED\\OBFUSCATED\.WITH SPECIAL_CHARS\\S +HARE\\NAME\\DOWN\\DEEP"; print netUse($destination); sub netUse { my $path = shift; my $cmd = "net use * $path"; my ($msg) = grep /Drive/, capture($cmd); return ($msg =~ /Drive (.*) is now connected/); }
In reply to Re^3: perl robocopy to temp mapped drive.
by poj
in thread perl robocopy to temp mapped drive.
by 3dbc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |