Logo 
Search:

Perl Forum

Ask Question   UnAnswered
Home » Forum » Perl       RSS Feeds

how to write this script for HTTP response

  Asked By: Robert    Date: Jul 30    Category: Perl    Views: 2738
  

Heres what I need " a query that does url lookup of http responses status 200, if the url returns response status is 200 do nothing. If the url returns response status is 500 send an email and write a log file".

Heres what I wrote

$ vi df.pl

#!/usr/bin/perl -w
curl -IL http://www.google.com

HTTP/1.1 200 OK

perl -w my_program.pl > my_output.txt

my $to='travlerv@yahoo.com';
my $from='travlerv@yahoo.com';
my $subject='HTTP Status 500';
exit

I keep getting invalid argument. Can some one help???

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on how to write this script for HTTP response Or get search suggestion and latest updates.




Tagged: