in reply to Don't want to wait

From perldoc perlfunc:
The exec function executes a system command and never returns-- use system instead of exec if you want it to return. It fails and returns false only if the command does not exist and it is executed directly instead of via your system's command shell.

Is exec get_mail what you want?

/brother t0mas

Replies are listed 'Best First'.
RE: Re: Don't want to wait
by SuperCruncher (Pilgrim) on Jul 16, 2000 at 23:59 UTC
    The exec function executes a system command and never returns
    I really think this part of the documentation should be modified a bit. (Anyone know who to contact?)

    When I first read that when I had a similar problem, I thought it meant did not return a value, and the "returns false only.." bit was put it as it is to emphasise that the function returning a value is a rare event.

    I would like it be changed to:
    "The exec function replaces the currently running process with the command or program called, unless the command or program does not exist. If the command or program does not exist, the call will fail and exec will return false."