Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The values in %INC always follow Unix conventions, regardless of which platform you’re on.

    (I cannot find this documented anywhere in the POD that ships with perl.)

    • by slanning (5049) on 2010.06.21 1:27 (#72096) Homepage Journal

      I only found a reference to it in perlfaq5 [perl.org]. It points out there that DOS does handle forward slashes in place of backslashes (though you have to put quotes around the file name, or it thinks the slash is an option).

      C:\Users\slanning>more > foo.txt
      hi there
      ^C

      C:\Users\slanning>perl -e "open(F, 'c:/Users/slanning/foo.txt') || die$!; while(<F>){print}"
      hi there

      C:\Users\slanning>perl -e "open(F, 'c:\Users\slanning\foo.txt') || die $!; while(<F>){print}"
      hi there