Tim writes.. >is there any way to open a hidden UNC path with the mkdir statement >given by a parameter. > >Let's say I run the script with the parameter > >\\server\new$ > >the path will get truncated one time by the newline '\n' and the dollar >sign will by cut off. > >Then putting it in the variable $x the statement > >mkdir( $x, 0777 ); > >will fail! > >I would like to use the script as a subroutine which will get >the path - >this have to be done as \\server\\share\new_directory. So it is not >possible to use an other syntax!
You will have to use another syntax somewhere. The only way that \n is translated to a newline is if the string is run through double-quotes somewhere. You must be doing something other than what you're telling us, where does your \\path\ come from? As an example, this works as expected: # file: blah.pl my $x = $ARGV[0]; mkdir( $x, 0777); Then out in cmd.exe if I call it like this: > perl blah.pl \\server\new$ Whereas this does not work: my $x = "\\server\new$"; mkdir( $x, 0777); Because of the double quotes. So although you say that it's not possible to use an other syntax, your example seems to suggest that you have control over the assignment, and in that case you just have to use another syntax, because the translation of \n to a newline is done at the assignment itself. Try this instead: my $x = '//server/new$'; Note the single quotes and the forward slashes. -- Jason King _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
