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 441919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:01:13+00:00 2026-05-12T21:01:13+00:00

I know what they all do, but have never found myself in a situation

  • 0

I know what they all do, but have never found myself in a situation where I’ve needed any of them. I’ve used BEGIN blocks on many occasions and ENDs once in a while. BEGIN is especially useful when you need to tweak the environment before code gets run, and I’ve used END in certain debugging situations to trap important state information for hard-to-track-down fatal errors.

Have you ever used CHECK, UNITCHECK or INIT? If so, what for? And would a BEGIN block not have sufficed for some reason?

The documentation for the blocks is on PerlDoc.

  • 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-05-12T21:01:13+00:00Added an answer on May 12, 2026 at 9:01 pm

    I had a package import function which would do some heavy duty processing and then make an eval call. How do you debug something like that? The import function gets run when you use the module, which takes place at compile time (like it was inside a BEGIN block). For some reason (I think it was because I needed to pass parameters to import with heredoc notation, but it could have been something else), it wasn’t good enough to say require Module; Module->import(@args).

    So my workaround was to build the string for eval in import, and save it another variable.
    Then I ran the eval in an INIT block. When you ran the debugger, the very first execution point was at the start of the INIT block and I could use the debugger to step through the eval statement.

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

Sidebar

Related Questions

We all know what virtual functions are in C++, but how are they implemented
I hear people writing these programs all the time and I know what they
I know they're using a jQuery plugin, but I can't seem to find which
Is there any real use for self modifying code ? I know that they
In Toyota manufacturing lines they always know what path a part have traveled. Just
I know how they are different syntactically, and that C++ uses new, and C
I'm just curious about this really, does anyone know why they broke convention on
I know PHP scripts don't actually compile until they are run. However, say I
I know that embedding CSS styles directly into the HTML tags they affect defeats
Anyone know a good lib where i can run the strings before they are

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.