in reply to What does chdir ?
Hi pcouderc,
How does the program "fail"? Is it just that you're not seeing output? The difference between the two samples you showed is that backticks capture the output of the program, which you are not doing anything with. So, probably system is better (I wrote at length about the two, their problems, and possible alternatives here), also, you should add some error checking. The following works for me:
#!/usr/bin/env perl use warnings; use strict; chdir 'core/efl' or die "failed to chdir: $!"; system('./autogen.sh')==0 or die "system failed, \$?=$?";
Hope this helps,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What does chdir ?
by pcouderc (Monk) on Feb 16, 2017 at 09:34 UTC | |
by Marshall (Canon) on Feb 17, 2017 at 02:14 UTC |