How do I write a Perl script to use curl to process a URL?

后端 未结 3 1713
我在风中等你
我在风中等你 2021-02-20 16:49

I have a very simple task. I have a crontab that will run a script every hour. The script is meant to simply process a URL.

This is what I have. It doesn\'t work. I get

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-20 17:37

    To call any shell command from Perl, you can use system:

    system "curl http://domain.com/page.html";
    

    Just enclose the shell command in quotes.

提交回复
热议问题