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 - your problem is not a 
>matter
>of NT or UNIX, but the script is quite buggy ;-).
>Try this one - it works:
>       #!/usr/bin/perl -w
>       print "Enter the full name of the file you are looking for:\n" ;
>
>       $url=<STDIN>;
>
>       chomp ($url);
>
>       if ($url =~ /^http:\/\//i)
>       {
>          print " You have chosen a file of type HTTP! ";
>       }
>       elsif ($url =~ /^http:\/\//i)
>       {
>
>          print "You have chosen a file of type FTP! ";
>       }
>       else
>       {
>          print "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'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 my
> > script?
> >
> >   #!/usr/bin/perl
> >       print "Enter the full name of the file you are looking for. " ;
> >
> >       $url=<STDIN>;
> >
> >       chomp ($url);
> >
> >       if ($url)  { HTTP:// };
> >
> >          print " You have chosen a file of type HTTP! ";
> >
> >       elsif ($url) { FTP:// } ;
> >
> >          print "You have chosen a file of type FTP! ";
> >      else ($url) {*} ;
> >
> >          print "I'm sorry. This program does not support that type of
>file."
> > ;
> > 
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at 
>http://www.hotmail.com.
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to