So what happens when those characters are encountered? I use something
similar to search for temp, cache & recycle folders, but have no odd
characters to deal with.

BTW, use chomp($DIR) instead of the regexp to remove the trailing \n.

Also, on the command that fails, check it's error status with or die,
like this:

&GetPerms($DIR) or die "Cannot process '$DIR': $^E";

--Jon


> 
> I'm currently writing a script to backup ntfs permissions 
> into a ini-file. Therefore I need to use something like the 
> dos-command DIR /S /AD /B. I tried to use this in my perl 
> script but I get an error when the DIR Names have letters 
> like �,�,�. Can I use Regex to change those letters ?
> 
> 
> @DIR = `DIR /S /AD /B`;
> foreach my $DIR(@DIR) {
>       $DIR = /(^.*)\n$/;      # Remove \n
>       .......
> }
> ....
> Andreas Lux
> 
> 
> _______________________________________________
> Perl-Win32-Admin mailing list 
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to