
gjarms
New User
Dec 20, 2013, 4:01 AM
Post #1 of 8
(5688 views)
|
Running shell commands within perl script
|
Can't Post
|
|
Hi Perl Gurus, This is my first post, so please forgive me if i violate any norms. I have been trying to run the shell command like the one below $cmd=[[`echo hello`]] || [[`echo hellohello`]] && sleep 10; actually i need to check the return value if null or not, if not null the the succeeding command should run. The above command will run fine in bash shell, when i tried within perl like `$cmd` it issues error [[ not found. But when i use eval command it seems to be working. eval $cmd, does not produce any error but "sleep" command is not called. Can someone help to solve this issue? Regards, gjarms
|