in reply to Re: Can I run a piece of code like child process?
in thread Can I run a piece of code like child process?

The short answer is yes. But it really depends on what you're doing as to whether it makes sense to. #!/usr/local/bin/perl my $string = "print \"hello\\n\";"; if (fork() == 0) { system "perl -e '$string'"; }
  • Comment on Re: Answer: Can I run a piece of code like child process?