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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:31:07+00:00 2026-05-26T16:31:07+00:00

I am attempting to create a top-level script that will call about 35+ other

  • 0

I am attempting to create a top-level script that will call about 35+ other scripts that will each seek to modify/create text files. Not the best approach of doing things and not the most fun either, but needs must.

I call each of these scripts with the ‘system’ command, but I would like to know of methods to find out which files have been created/modified by each script that was called.

The most non-intrusive way is to simply note the timestamps on all files in the work directory before and after running the sub-script, but I worry that might not be robust enough.

So I am wondering whether there is a module/method in Perl which I can quickly put into all the sub-scripts that will catch all file operations and pass that onto the calling script as a return value of some sort?

All help much appreciated and alternative ideas very welcome indeed!

cheers

  • 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-26T16:31:08+00:00Added an answer on May 26, 2026 at 4:31 pm

    Like a’r suggested, I would be tempted to use strace. Replace calls to system() with calls to this wrapper:

    use File::Temp qw/tempfile/;
    
    # ...
    
    sub sys { # a wrapper for system()
      my ($fh, $filename) = tempfile();
      my $st = system("strace", "-o", $filename, "-eopen", @_);
    
      # report files used by the script -- customize as needed
      print STDERR "files accessed by $_[0]:\n";
      while (<$fh>) { print STDERR; }
    
      return $st;
    }
    

    Then you only modify the parent script instead of all of the child scripts.

    The -eopen parameter to strace filters out only the open calls. This will also catch calls to fopen (which is a C library routine and not a system call.)

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

Sidebar

Related Questions

I am attempting to create a web page that will allow a user to
I'm attempting to create a custom calendar control that inherits from ASP.Net's built in
I am attempting to create a Tab Control Style that basically looks like buttons
I am attempting to create a wcf service that accepts any input (Action=*) and
I'm attempting to create a Parcelable class in Android so that I can pass
i'm attempting to create an header which is divided into 3 divs they will
I am attempting to create a 3 x 3 grid of items. Each Item
I'm attempting to write a query that will return The most recent AccountDate with
pg474, K.N.King The general rule in C99 is that if all top-level declarations of
So I'm attempting to create a report that is able to pre-fill a government

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.