Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: DBD::CSV::prepare() problems

by afoken (Parson)
on Aug 26, 2012 at 20:40 UTC ( #989875=note: print w/ replies, xml ) Need Help??


in reply to Re^4: DBD::CSV::prepare() problems
in thread DBD::CSV::prepare() problems

Go ahead and use / on every OS you have

Nonsense! Not every OS uses the forward slash (/) as path separator.

DOS and Windows (and OS/2, I think) allow to use both backslash (\) and forward slash, so you can use the forward slash on Windows, except when you try to use external tools that expect that you only use the backslash.

On a classic, non-X MacOS, you will fail miserably because MacOS uses single colons (:).

Same game, different rules with VMS: / works only in Unix emulation, the native interface uses single colons, double colons (C<::>), square brackets ([]), angle brackets (<>), periods (C<.>), and semicolons (C<;>) to separate the parts of a fully qualified file name.

File::Spec is not perfect, but it still is better than simply using the forward slash everywhere.

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: DBD::CSV::prepare() problems
Select or Download Code
Re^6: DBD::CSV::prepare() problems
by Anonymous Monk on Aug 27, 2012 at 00:34 UTC

    Nonsense! Not every OS uses the forward slash (/) as path separator.

    So what, the OP doesn't have one of those

    On a classic, non-X MacOS, you will fail miserably because MacOS uses single colons (:).

    No you won't, you'll get a nice error message, and then you cheerfully fix it -- or it will cheerfully work and you'll get a file with slashes in the name -- no misery anywhere

    Same game, different rules with VMS ...

    Same ol' same ol'

    File::Spec is not perfect, but it still is better than simply using the forward slash everywhere.

    File::Spec is great, Path::Class is better, but using forward slashes on unix/linux/windows will work 99% of the time

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989875]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (16)
As of 2014-07-29 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (225 votes), past polls