Oops!
I just discovered a little mistake made by quick copy'n'paste.
The line
elsif ($url =~ /^http:\/\//i)
should read
elsif ($url =~ /^ftp:\/\//i)
of course.
Sascha
--
"We Apologize For The Inconvenience"
(God's Last Message To His Creation by Douglas Adams)
Lightning flashed, thunder crashed and "Sascha Kersken" <[EMAIL PROTECTED]> w
hispered:
| if ($url =~ /^http:\/\//i)
Try and save yourself from going blind trying to decipher all those slashes
and backslashes. If you have a literal slash in your code, change your
delimiters:
if ($url =~ m
Lightning flashed, thunder crashed and "Sparkle Williams" <[EMAIL PROTECTED]>
whispered:
| I'm trying to write a perl script that can distinguish between http and ftp
| files. I got it to work on my UNIX system using case, but I can't seem to
| get it to function correctly when I switch to usin
On Wed, Jul 18, 2001 at 03:11:22PM +0200, Sascha Kersken wrote:
> Oops!
> I just discovered a little mistake made by quick copy'n'paste.
> The line
>elsif ($url =~ /^http:\/\//i)
> should read
> elsif ($url =~ /^ftp:\/\//i)
> of course.
Actually, it should probably read something like:
Or, at the risk of beating a dead horse:
#!/usr/bin/perl -w
use strict;
my $url = shift || '';
$url =~ /^(.*?):/;
my $protocol = lc($1);
my %handlers = (
'http' => \&http_handler,
'ftp' => \&ftp_handler,
'https' => \&http_handler,
'ftps'
MANY MANY THANKS!!!
>From: "Sascha Kersken" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Re: if then and perl
>Date: Wed, 18 Jul 2001 14:56:49 +0200
>
>Hi!
>This looks a bit strange to me.
>I wonder how this could ever have run on UNIX -
Oops!
I just discovered a little mistake made by quick copy'n'paste.
The line
elsif ($url =~ /^http:\/\//i)
should read
elsif ($url =~ /^ftp:\/\//i)
of course.
Sascha
--
"We Apologize For The Inconvenience"
(God's Last Message To His Creation by Douglas Adams)
"I'm sorry. This program does not support that type of file."
;
}
Sascha
- Original Message -
From: "Sparkle Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 2:45 PM
Subject: if then and perl
> I
I'm trying to write a perl script that can distinguish between http and ftp
files. I got it to work on my UNIX system using case, but I can't seem to
get it to function correctly when I switch to using if-then on my Windows NT
system. Does anyone have any ideas as to how I can correctly adjust