Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how to save URL into a file

would anyone tell me how to save URL into a file in Perl?

Thanks for help

Comments

  • JonathanJonathan Posts: 2,914Member
    Hi,

    Don't know how much Perl you know.... But, here is how you append a URL to the end of a file, so you can have a list of them:-

    open FILE, ">>filename.dat";
    print FILE $url;
    close FILE;

    Where $url contains the URL. Or for a new file, take the >> and shorten it to just > - that overwrites or newly creates rather than appends.

    If you are unsure how to get the URL into the variable $url, please give me more details of what you try to do, and I'll help you more.

    Take care,

    Jonathan

    ------------------------------------------
    Count downloads from your site for free!
    http://www.downloadcounter.com/

Sign In or Register to comment.