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

  • SEARCH
  • Home
  • 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 8683285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:00:00+00:00 2026-06-12T22:00:00+00:00

I have a written a script that uses different modules. The script a loop,

  • 0

I have a written a script that uses different modules.
The script a loop, returning to the beginning until it reaches a certain id and the dies.

But sometimes, the result of a module query is undefined and the script stops. In my current case:

Can't use an undefined value as a HASH reference at /modulepath/module.pm line xxx

How can I tell Perl, not to stop and skip the current processing?
I tried to use the follwing without success:

if (defined $var->movie( id => $imdb )){ 
#do the usual stuff 
}
else {
#skip and do nothing
}
  • 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-12T22:00:01+00:00Added an answer on June 12, 2026 at 10:00 pm

    Use eval to keep code from aborting your script.

    eval {
      # code that might blow up
    };
    if ($@) { 
      # it blew up, but we're still running
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have now written a number of different functions in Google Apps Script that
I have a script, written in PHP that uses the AWS Dynamo PHP API.
I have written a script in python that uses cookies and POST/GET. I also
So I have a comments script I've written in Codeigniter that uses PHP and
I have written a script that relies on other server responses (uses wget to
I have written a script that fires a jQuery POST to retrieve data from
So I have a strange question. I have written a script that re-formats data
I have written a Python script that will generate a series of graphs and
I have written a data munging script that is very CPU intensive. It has
I have a written a script in PHP that reads from data from a

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.