Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8500867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:03:22+00:00 2026-06-11T01:03:22+00:00

I am running a script that pulls URLs from a database and performs a

  • 0

I am running a script that pulls URLs from a database and performs a file::fetch(). From my understanding, file::fetch() only works when there is really a file in the URL to be downloaded.

However, in my database there is the occasional URL where there is no file to be fetched. So, is there any module I can use to check that there is a file in the URL I am attempting to perform a file::fetch()?

There is a line in my script

my $uri_handle = File::Fetch->new(uri => $url);

where the $url may be something like http://asiaone.com with no file to actually be fetched.

And I get this error which I am desperately trying to avoid because there are other URLs that mostly contain files to fetch.

Use of uninitialized value $path in pattern match (m//) at C:/Perl/lib/File/Spec/Unix.pm line 267.
Use of uninitialized value in string eq at C:/Perl/lib/File/Fetch.pm line 395.
Hostname required when fetching from 'http' at C:\test\multihashtest2.pl line 100 thread 2

How can I format my regular expression to check for files or is there a module I can use to facilitate this?

A legitimate URL would be something like below

http://the.earth.li/~sgtatham/putty/latest/x86/puttytel.exe
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:03:24+00:00Added an answer on June 11, 2026 at 1:03 am

    From the manual of File::Fetch there is this flag, $File::Fetch::WARN, which you can set to false in order to silence the errors:

    This variable controls whether errors encountered internally by
    File::Fetch should be carp’d or not.

    Set to false to silence warnings. Inspect the output of the error()
    method manually to see what went wrong.

    Defaults to true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an R script that pulls data from a MySQL database, processes it,
I am currently running a PHP script that queries the database and then sends
I have a script that I'm running from the home directory to search for
I have a script that is supposed to sit there, happily running in a
I have a server with a PHP script that pulls data from a source
SO I have a script that pulls information from an event webpage. URL is
I am running a script that will append an element upon selecting it from
I am running a script that animates a plot (simulation of a water flow).
I have a php script that is running in CLI and I want to
I have a Python script that is running a few ls commands. This script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.