Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Can Perl do anything Java can do?

by kennethk (Abbot)
on Jul 19, 2017 at 14:05 UTC ( #1195470=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can Perl do anything Java can do?
in thread Can Perl do anything Java can do?

You should be aware that if you specify a path with forward slashes to a Windows instance of perl, the interpreter will usually auto-convert the forward slashes to backslashes for file access. This is a particularly helpful feature when wrapping a Windows path in interpolating delimiters, e.g. double quotes. Obviously, File::Spec et al. represent the most transferable approach.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re^4: Can Perl do anything Java can do?

Replies are listed 'Best First'.
Re^5: Can Perl do anything Java can do?
by Corion (Pope) on Jul 19, 2017 at 14:14 UTC

    Actually, it's Windows itself that copes with forward slashes as well as backslashes, not Perl.

    It is mostly the shell and UNC filenames that really need backslashes.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1195470]
help
Chatterbox?
[LanX]: it was just after Trump-ageddon and the Americans thought I'm ridiculing them ;)
Discipulus was not the title a bit provoking? ;=)
[LanX]: I have a degree in cynism. ..

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-11-20 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?