(BTW, the error message you cited is caused by having an empty string to the left of the pipe symbol in a shell command.)
In any case, this next part is almost certainly not what you really want:
I think you meant to use the "=~" operator there (to alter the contents of $conf, assuming it's not empty)? As it is, when the substitution fails, $conf is be set to empty string. (It would be set to "1" on success, but that would only happen if by chance $_ contains "99").# changes a setting $conf = s/99/$num/;
But even with the "=~" operator there, the next part doesn't make sense: if the initial backtick command worked as intended, $conf would contain a multi-line string. If you change a 99 in that string to something else, it's still multi-line, and I expect that putting it at the start of a pipeline in another backtick shell command would be a bad idea.
(Update: added clarification in first paragraph, fixed grammar in the second; also wanted to point out that the initial backtick command (cat; ls) should probably be replaced by using perl-internal operations: open/read the file, use a file glob or readdir; this would make the error handling better.)
In reply to Re: benchmarking problem
by graff
in thread benchmarking problem
by drawde83
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |