f



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 ("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.
0
brian (1246)
3/14/2010 10:00:03 PM
comp.lang.perl.misc 33233 articles. 2 followers. brian (1246) is leader. Post Follow

0 Replies
868 Views

Similar Articles

[PageSpeed] 20

Reply:

Similar Artilces:

FAQ 5.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #9
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 ("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? #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.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #4
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 ("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 e...

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.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.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 ex...

FAQ 5.36 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work? #2
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.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.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.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...

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 seems to only log me out to the GDM login screen, then i must shutdown from a command line to get it to happen... is this a permission thing? Hardware is a Dell studio XPS laptop, its quite high spec and being Dell pretty standard components, it ran 9.04 fine and I have gone through the compatibility check. Overall impression of this upgrade, not great. I don't honestly think i can rely on this laptop for my work which is a bad sign as i need to work more than i need to tinker getting ubuntu working. I appreciate the efforts of the various developers and the ubuntu team who put this together, but sound and video seem to be issues in every release, yet cloud computing is more important to get into the next LTS. Yes that is a selfish view, but how long do we have to live with 27 competing sound systems and a mexican stale mate on binary video drivers?" ...

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? #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? #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? #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...

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.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.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 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 of Perl's functions and operators, can tell which context it was called in and behaves appropriately. In general, the scalar() function can help. This function does nothing to the data itself (contrary to popular myth) but rather tells its argument to behave in whatever its scalar fashion is. If that function doesn't have a defined scalar behavior, this of course doesn't help you (such as with sort()). To enforce scalar context in this particular case, however, you need merely omit the parentheses: local($foo) = <FILE>; # WRONG local($foo) = scalar(<FILE>); # ok local $foo = <FILE>; # right You should probably be using lexical variables anyway, although the issue is the same here: my($foo) = <FILE>; # WRONG my $foo = <FILE>...

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...

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 ConfirmHardware = yes ;no DisableVirtualOemDevices = No DUDisable = Yes DUShare = "%SYSTEMDRIVE%\DU_Cabs" DriverSigningPolicy = Ignore ExtendOemPartition = 10000 FactoryMode = No FileSystem = ConvertNTFS ForceHALDetection = No Hibernation = No ;InstallFilesPath = "\\%SERVERNAME%\RemInst\%INSTALLPATH%\%MACHINETYPE%" ;KeyboardLayout = Us LegacyNIC = 1 NtUpgrade = no NoWaitAfterTextMode = 1 ;0 OemFilesPath = "%SYSTEMDRIVE%\OEM_Files" OemPnPDriversPath = "Drivers\Nic;\Drivers\RAID;\Drivers\SCSI;\Drivers\Video\Intel;\Drivers\Video\Ati;\Drivers\Audio;\Drivers\FSC;" OemPreinstall = Yes OemSkipEula = Yes OverwriteOemFilesOnUpgrade = No Repartition = Yes TargetPath = \WINDOWS UnattendMode = FullUnattended UnattendSwitch = Yes WaitForReboot = Yes Win9xUpgrade = No...

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 ...

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

Resources last updated: 3/29/2016 4:52:30 AM