f



FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #7

This is an excerpt from the latest version perlfaq5.pod, which
comes with the standard Perl distribution. These postings aim to 
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

5.34: Why can't I use "C:\temp\foo" in DOS paths?  Why doesn't `C:\temp\foo.exe` work?

    Whoops! You just put a tab and a formfeed into that filename! Remember
    that within double quoted strings ("like\this"), the backslash is an
    escape character. The full list of these is in "Quote and Quote-like
    Operators" in perlop. Unsurprisingly, you don't have a file called
    "c:(tab)emp(formfeed)oo" or "c:(tab)emp(formfeed)oo.exe" on your legacy
    DOS filesystem.

    Either single-quote your strings, or (preferably) use forward slashes.
    Since all DOS and Windows versions since something like MS-DOS 2.0 or so
    have treated "/" and "\" the same in a path, you might as well use the
    one that doesn't clash with Perl--or the POSIX shell, ANSI C and C++,
    awk, Tcl, Java, or Python, just to mention a few. POSIX paths are more
    portable, too.



--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in 
perlfaq.pod.

-- 
Posted via a free Usenet account from http://www.teranews.com

0
brian125 (4408)
8/7/2007 1:03:04 PM
comp.lang.perl.misc 33233 articles. 2 followers. brian (1246) is leader. Post Follow

0 Replies
760 Views

Similar Articles

[PageSpeed] 44

Reply:

Similar Artilces:

FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #5 339407
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.34: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape charac...

FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #8
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.34: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings (&qu...

FAQ 5.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #7
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings (&quo...

FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #4 555136
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.34: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings (&qu...

FAQ 5.33: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.33: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape charact...

FAQ 5.33 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.33: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape charact...

FAQ 5.36 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #3
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.36: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape character. The full list of these is in "Quote and Quote-like Operators" in perlop. Unsurprisingly, you don't have a file called "c:(tab)emp(formfeed)oo" or "c:(tab)emp(formfeed)oo.exe" on your legacy DOS filesystem. Either single-quote your strings, or (preferably) use forward slashes. Since all DOS and Windows versions since something like MS-DOS 2.0 or so have treated "/" and "\" the same in a path, you might as well use the one that doesn't clash with Perl--or the POSIX shell, ANSI C and C++, awk, Tcl, Java, or Python, just to mention a few. POSIX paths are more portable, too. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily ex...

FAQ 5.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #10
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings (&quo...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #7 216825
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? 310467
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #4 466038
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #2 1207236
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #2 228266
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #4 211407
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.19 Why doesn't "my($foo) = <FILE>;" work right? #4 238897
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.19: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, like so many ...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #2 301726
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, li...

FAQ 7.20 Why doesn't "my($foo) = <FILE>;" work right? #6 444776
This is an excerpt from the latest version perlfaq7.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 7.20: Why doesn't "my($foo) = <FILE>;" work right? "my()" and "local()" give list context to the right hand side of "=". The <FH> read operation, li...

Ubuntu Lurid crapware: "sound stopped working..video unstable...can't read USB sticks...battery meter inaccurate...shutdown doesn't work"
"Sound - worked then stopped working (just one boot up the controls were gone and no sound came from anywhere), now fixed with the removal of pulse (this is a standard issue with ubuntu since 8.04). still have an issue with going to system->prefs->sound, its just hangs waiting for sound system. Video - Nvidia card but unstable video and no openGL until attention given to correct driver - the standard install looked pretty grim. USB sticks cannot read, get permission denied errors. Battery meter seems wildly inaccurate, claims 7 hours then dies in 2. Shutdown see...

how to avoid line return when using python -c 'print "foo"'
Hi everybody, All my problem is in the title. If I try: $ python -c 'print "foo",' It does not change anything, surely because the line return is added by "python -c". Thanks in advance Julien -- TP (Tribulations Parall´┐Żles) "Allez, Monsieur, allez, et la foi vous viendra." (D'Alembert). On Fri, 18 Jul 2008 23:04:06 +0200, TP wrote: > All my problem is in the title. > If I try: > > $ python -c 'print "foo",' > > It does not change anything, surely because the line return is added > by "python -c&q...

FAQ 5.37 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? #7
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.37: Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? This is elaborately and painstakingly described in the file-dir-perms article in th...

Unattend 2003
Hi @all, i have installed a Windows 2003 Server Unattend. The problem is now that Windows dosent copy the Directories "Driver" and "Temp" to the harddisk where windows must be installed. Do you have an idea why is it so ?? I installed windows 2003 server from a secondary Harddisk d: . d:\win2003.srv\$OEM$\$1\drivers d:\win2003.srv\$OEM$\$1\temp d:\win2003.srv\$OEM$\$$ d:\win2003.srv\$OEM$\Textmode d:\win2003.srv\I386 [Unattended] ActivateProxy = Proxy1 AutoActivate = No ;ComputerType = "OEM HAL", OEM CrashDumpSetting = 0 ConfirmHard...

Visual C++'s :"clean solution" doesn't clean the solution?
Hello, I'm trying to build a large project, and I've found that when something doesn't compile properly, and I attempt to re-build it, Visual C++ Express doesn't make a new attempt. So then I try to clean the solution, but this has literally no effect because when I try to build after that, again no attempt to made to build. Can someone tell me to really to clean the solution, removing all intermediate files and output files? Thanks. On Fri, 30 May 2008 06:01:11 -0700, plenty900 wrote: > Hello, > > I'm trying to build a large project, and I've found that ...

my "7" key doesn't make a 7 about have the time, it clicks but no "7"
What is HP doing about these sorts of keyboard problems? Are the fixing them by replacing your calculator -- what is the turn around? Sincerely, Kevin Waite Apparently (I don't own one yet) people have been fixing these intermittant keys by "rubbing the oxidation layer off the bord". At least that's my take on it. I think they wiggle the key back and forth when pressed so that it makes the contact inside the calculator move around a bit. A search back on 49+ and keys will find a message to that effect about 2 months ago I think.. Al... "Kevin Waite" <K...

FAQ 5.34 Why doesn't glob("*.*") get all the files?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.34: Why doesn't glob("*.*") get all the files? Because even on non-Unix ports, Perl's glob function follows standard Unix globbing semantics. You'll need "glob("*")" to get all (non-hidden) files. This makes glob() portable even to legacy systems. Your port may include proprietary globbing functions as well. Check its documentation for details. -------------------------------------------------------------------- Documents such as this have been called "Answers to Frequently Asked Questions" or FAQ for short. They represent an important part of the Usenet tradition. They serve to reduce the volume of redundant traffic on a news group by providing quality answers to questions that keep coming up. If you are some how irritated by seeing these postings you are free to ignore them or add the sender to your killfile. If you find errors or other problems with these postings please send corrections or comments to the posting email address or to the maintainers as directed in the perlfaq manual page. Note that the FAQ text posted by this server may have been modified from that distributed i...

Web resources about - FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #7 - comp.lang.perl.misc

Resources last updated: 3/16/2016 2:56:05 AM