in reply to Re^4: What is the meaning of this line in Perl on linux?
in thread What is the meaning of this line in Perl on linux?

I guess "pre-Modern" means Windows 3.1, April 6, 1992?

Nope. All DOS versions back to at least 2.0 (March 1983) supported both forward and backslashes in paths. Using the backslash was more or less just a convention, partially enforced by programs using the forward slash to indicate an option (instead of a path). But the switch character could be changed from DOS 2.0 up to 3.31 to something else, and so the forward slash could have been used in paths even on the command line (see Re^6: moving from mac to PC -- win internal commands). The DOS API functions (i.e. int 0x21) always accepted both forward and backslashes.

DOS 1.x had no subdirectories and thus did not need and did not use forward or backslashes. Each (floppy) drive had exactly one directory, the root directory, and thus it was sufficient to prefix a filename with the drive letter and a colon to get an absolute path.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^5: What is the meaning of this line in Perl on linux?

Replies are listed 'Best First'.
Re^6: What is the meaning of this line in Perl on linux?
by Marshall (Canon) on Mar 29, 2022 at 07:08 UTC
    Another tribute to the amazing depth of knowledge of the Monks!

    My experience pre-dates DOS and even I didn't remember this DOS 1.x stuff!

    But we are still back at the same point: use forward slash unless you have a specific reason to do otherwise.