ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
16.3. Replacing the Current Program with a Different OneProblemYou want to replace the running program with another, as when checking parameters and setting up the initial environment before running another program. SolutionUse the built-in exec("archive *.data") or die "Couldn't replace myself with archive: $!\n"; If you pass exec("archive", "accounting.data") or die "Couldn't replace myself with archive: $!\n"; If called with a single argument containing no shell metacharacters, the argument will be split on whitespace and then interpreted as though the resulting list had been passed to exec("archive accounting.data") or die "Couldn't replace myself with archive: $!\n"; DiscussionThe If you See AlsoThe |