Hello Perl_Sheep, and welcome to the Monastery!
Backticks interpolate, so Perl substitutes the value of $SERVICEBIN for the name, and this happens before the command is passed to the shell. You can suppress interpolation in two ways (see perlop):
$COREBT = `dbx -c "where;quit" \${SERVICEBIN} /tmp/core.core01.1377820 +552 2>&1`; # Add this: ^ # OR $COREBT = qx'dbx -c "where;quit" ${SERVICEBIN} /tmp/core.core01.137782 +0552 2>&1';
Did you have use strict; at the head of your script? It would alert you to the fact that $SERVICEBIN is being used without first being declared.
Also, please display your code within <code>...</code> tags as this makes it easier for the monks to read. And please be more specific about the problem you are facing: just saying “this Perl script doesn’t work“ isn’t much for us to go on!
Hope that helps,
Update: Removed unneeded backslash from the single-quoted version. Thanks to AnomalousMonk for the heads-up.
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: using dbx with perl
by Athanasius
in thread using dbx with perl
by Perl_Sheep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |