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]

Reply via email to