Gn0m3 has asked for the wisdom of the Perl Monks concerning the following question:

My Little "script" is not working right, if any of the URLs to check is down it doesn't follow. Here is the script:
@echo off echo. Echo ################################################### Echo .:::::::::::: Webm Applications Status ::::::::::::. Echo ################################################### echo. get -S -d http://site0080.someweb.com && get -S -d http://site0090. +someweb.com && get -S -d http://site0050.someweb.com && get -S -d ht +tp://site0060.someweb.com && get -S -d http://site2220.someweb.com & +& get -S -d http://site2230.someweb.com && get -S -d http://site2240 +.someweb.com && get -S -d http://site2250.someweb.com && get -S -d h +ttp://site2020.someweb.com && get -S -d http://site1570.someweb.com Echo. Echo ################################################### Echo .:::::::::::::::::::::::::::::::::::::::::::::::::. Echo ###################################################
It's a completely newbie script so please do not hate me

Replies are listed 'Best First'.
Re: lwp-request issue.
by JavaFan (Canon) on Aug 18, 2010 at 12:30 UTC
    Well, duh. You're using '&&'. Which in the shell short-cuts the same way it does in Perl. Replace the '&&' with ';' just as you would do in Perl.
      Very nice how you could still give a question totally devoid of any Perl content, a Perl twist!

      ++

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      This looks like DOS to me, so I'd rather put each get statement on a separate line.
        Bart Indeed is a batch (.cmd) but as I'm using LWP-REQUEST (GET) already tried one get per line but it doesn't work, I tried the following script:
        Echo. get -S -d http://www.yahoo.com get -S -d http://www.google.com get -S -d http://www.ciudad.com.ar get -S -d http://www.gmail.com get -S -d http://www.clarin.com get -S -d http://www.claro.com.ar get -S -d http://www.mail.com get -S -d http://www.facebook.com Echo.
        But I only get the result of the first one like this:
        GET http://www.yahoo.com --> 302 Found GET http://ar.yahoo.com/?p=us --> 200 OK
      JavaFan I tried replacing the '&&' with ';' but this is the result I get: GET ; --> 400 URL must be absolute