in reply to quoting problems passing pattern to shell in backquotes

bash: -c: line 0: syntax error near unexpected token `('

As I noted in my reply to your other node, you have to use \n instead of the semicolon to separate the shopt -s extglob statement from the rest, i.e.

#!/usr/bin/perl $pat='+([^-])-+([^-]).rpm'; $a=`bash -c "shopt -s extglob\necho gcc-$pat"`; print "a=$a\n";