in reply to Re^3: perl tk widget will not copy files
in thread perl tk widget will not copy files

On Windows 8.1 using Perl 5.20.2 running:

use strict; use warnings; opendir my ($root), 'C:\Users\Default'; my @dirs = readdir $root; print "$_\n" for @dirs;

Prints (in part):

. .. AppData Application Data Cookies Desktop Documents Downloads Favorites Links Local Settings Music My Documents

so it seems there is no "design cause" for the behaviour you see because it doesn't exist.

perl -V reports in part:

Summary of my perl5 (revision 5 version 20 subversion 2) configuration +: Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.20.2.1 #1 Sat Feb 21 18:04:11 2015 +x64'
Premature optimization is the root of all job security

Replies are listed 'Best First'.
Re^5: perl tk widget will not copy files
by anonymized user 468275 (Curate) on Aug 12, 2015 at 09:23 UTC
    The platform I reproduced it on was Windows 7. I notice also you used Strawberry Perl for your test. I don't know where or when this behaviour got fixed, but to say it doesn't exist seems rash under the circumstances.

    One world, one people

      I have used various versions of Perl ranging from 5.8 through 5.20 on Windows XP, Vista, 7 and 8.1 without having any issue using either \ or /, or indeed mixing them, as path separators for internal Perl file operations or for most Windows command line file operations.

      There are Windows applications that don't play the game. msiexec is one of them as I found out while fixing a bug in our build and test system today. Maybe what you saw was nothing to do with Perl but happened in a context where you were using Perl?

      Premature optimization is the root of all job security

        I found a problem with this some time ago Win 8.1 Perl 5.16.1

        #!perl use strict; use Win32::OLE::Const 'Microsoft Excel'; Win32::OLE->Option(Warn => 3); my $ex = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $wb = $ex->Workbooks->Open('c:/temp/Book1.xls') ; my $ws = $wb->sheets(1); my $cell = $ws->Cells(7,2); # b7 $cell->Borders(7)->{LineStyle} = xlNone; #left # save and exit # this works $wb->SaveAs( 'c:\\temp\\changedborder.xls' ); # this gives error #$wb->SaveAs( 'c:/temp/changedborder.xls' ); #C:\//' cannot be accessed. The file may be corrupted, located on a se +rver #that is not responding, or read-only. #in32::OLE(0.1709) error 0x800a03ec # in METHOD/PROPERTYGET "SaveAs" at borders.pl line 16.
        poj