in reply to Re^2: sh: -c: line 1: syntax error near unexpected token `|'
in thread sh: -c: line 1: syntax error near unexpected token `|'
Probably better to place quotes around the command, for example:
Also, you might like to use "end of options":
or use somthing like q()$cmd = "'------------- Hello World ------------'";
Also, you might like to use "end of options":
my $result = `echo -- $cmd | grep -- '\-\-\-\-'`;
In Section
Seekers of Perl Wisdom