Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24.
From: Peter Wyzl (wyzelli_at_yahoo.com)
Date: 11/29/04
- Next message: Sébastien Cottalorda: "Re: $SIG{IO} example"
- Previous message: Arndt Jonasson: "Re: perl trim function"
- In reply to: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Next in thread: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Reply: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 12:02:54 GMT
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:ih0mq0t6g8nsng397s94s39dkqd3mc2b9m@4ax.com...
: On Mon, 29 Nov 2004 08:47:52 GMT, "Peter Wyzl" <wyzelli@yahoo.com>
: wrote:
:
: >: > command.com and cmd.exe both understand / as well as \ for directory
: >: > seperators.
: >:
: >: Bull****. A / does not work as a directory separator in DOS or
Windoze,
: >: and never has -- it is a command options or "switch" designator:
: [...]
: >I beg to differ... the problem you have is with the dir command, not
: >cmd.exe.
: >
: >you can 'cd' to /junk
: >
: >you can cd to /junk/junk2 etc
: >
: >open (IN, 'c:/junk/junk2/file.txt') or die "Can't $!\n";
: >
: >works perfectly fine as well.
:
: I beg to differ... what you wrote is still BS, since it has nothing to
: do with command.com and/or cmd.exe: indeed Windows *APIs* do support
: both '/' and '\' as directory separators. You can even mix them in a
: single specification.
:
: >Since we are dealing with Perl, the context of the comment is important,
in
: >that a forward slash works perfectly well, in all instances except
accessing
:
: It works perfectly *within* perl[1]. Still this has NOTHING to do with
: either command.com or cmd.exe! Whatever the context of the comment can
: be, whatever we're dealing with, what you wrote about command.com and
: cmd.exe is WRONG, period.
:
: The examples you gave are wrong and misleading as they have nothing to
: do with any shell (apart a possible ambiguity with C<cd>, that could
: be interpreted as an internal Perl command or a shell one).
:
:
: [1] no matter if by means of some magic it does or directly by means
: of Windows APIs capabilities. I don't know which of the two is true,
: BTW...
Windows API.
To get back to the original comment, Bob said that as far as he knew it had
to have a literal backslash if Windows was looking at it. I countered that
this is not true. There are cases where Windows requires a literal
backslash (File::Find suffers from it) but it is not universally true. Bob
gave an example where a forward slash is not accepted (/ being a switch
delimiter) and I gave an example where it is. Within Perl / is accepted
because perl does the right thing. Stating that 'Windows requires a literal
backslash' is what was incorrect.
However, this was not intended to be a discussion about Windows or cmd.exe.
It WAS intended to be a discussion about what happens within [Pp]erl and
that / can be used as much as \\ in programs written in Perl. This enhances
readability and portability.
What I wrote about cmd.exe is not wrong, I gave an example that supported
that statement. This is NOT universal, and is not even the difference
between internal/external commands. However, the point I was making was
(trying to make?) is that / works in perl. Why you have to tell me I wrote
BS and then state the same thing is a little confusing to me.
--
Wyzelli
if (-e 'c:/windows/win.ini'){print 'Just another Perl Hacker'};
- Next message: Sébastien Cottalorda: "Re: $SIG{IO} example"
- Previous message: Arndt Jonasson: "Re: perl trim function"
- In reply to: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Next in thread: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Reply: Michele Dondi: "Re: 500 Can't connect to search.cpan.org:80 (Bad protocol 'tcp') at web.plline 24."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|