The first step is to look at the value of $SYNC in the error case.
Maybe it contains whitespace, or it contains additional information or other stuff. Maybe it is empty because the command didn't output anything?
You are doing a lot of awk-ing and grep-ping in your pipelines - Perl can do that too, and maybe you're throwing away important information, at least for debugging?
In reply to Re: word search in perl script
by Corion
in thread word search in perl script
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |