Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: Getting back main script

by ELISHEVA (Prior)
on Feb 24, 2011 at 14:33 UTC ( #889987=note: print w/replies, xml ) Need Help??

in reply to Re^2: Getting back main script
in thread Getting back main script

Exec should give you back control. If it didn't we're going to have to brainstorm together and that is quite hard to do with something as vague as "didn't work".

Could you be more precise about what you mean by "didn't work". Didn't work as in "didn't run"? Didn't work as in "didn't get back control"? If you know your script started, how did you know that? What did you see/look for? If you didn't get back control, how did you know that?

At this point, I think it might help if you reduced your code to the smallest possible number of lines that illustrate the problem and then post those lines (preferrably by updating your original post so everyone can see it). How exactly did you make the call to exec? What went before? What came after?

If you are lucky, getting things down to the smallest number of lines that illustrate the problem (and I do mean smallest), might actually tell you why it didn't work. Otherwise, we'll all be in a better position to brainstorm with you.

  • Comment on Re^3: Getting back main script

Replies are listed 'Best First'.
Re^4: Getting back main script
by Ratazong (Monsignor) on Feb 24, 2011 at 14:40 UTC

    From the exec documentation:

    The exec function executes a system command and never returns.
    And when executing the following script
    exec "dir /s d:\\temp\\"; print "done\n"; exit 0;
    I get the warning
    Statement unlikely to be reached at line 2. (Maybe you meant system() when you said exec()?)
    So exec isn't likely the correct answer to "getting back control". ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://889987]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2021-03-04 20:00 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (107 votes). Check out past polls.