I have a nice, simple question, though the answer may not be as simple. I really don't know. First, two code snippets.
Snippet one:
exec('/etc/init.d/networking restart');
Snippet two:
my $output = `/etc/init.d/networking restart`;
print $output;
So, with those in mind -- why does the backtick version take an age and a half to run, while the /etc/init.d/networking restart that picks up where exec() left off is pretty much instantaneous? I don't imagine the assignment can be taking that long, though I suppose I could for some reason be mistaken in such an assumption.
print substr("Just another Perl hacker", 0, -2); |
|
- apotheon
CopyWrite Chad Perrin |