Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You got to give us more information on the error (can you post the error?). if you are talking about your die erroring out then you you need to check if your program (test_script.pl) worked or not before you debug the one you posted. The code you had and the one i posted work just fine for me (with the modification).

Also couple of things -

1. Can you run your test script on the command line with an argument does it work? can you do that with a * (shell wild-card) does it work?

2. Do something like  my $ret = `perl test_script.pl $f`; and then print out $ret for each file.

Make sure you have  use warnings

Hope this helps.

-SK

Update: Thanks sgifford! It is a good point and I think that could be the reason why the script is failing.

sbp, Actually tho, i am wondering why would you even need this wrapper script? Can't you just do test_script.pl * on the directory you want?


In reply to Re^3: calling a perl script within a perl script by sk
in thread calling a perl script within a perl script by sbp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-24 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found