in reply to Re^4: Command line question
in thread Command line question
I'd like to actually get the .depend file before the Perl script, then again after it to compare
No problem! Change "perl -ni -e" to "perl -ni.bak -e", and you'll find a ".depend.bak" file that has its contents before perl got a hold of it. If there's already a .bak file being produced, you can use "perl -ni.before.tha.mangalang -e" or whatever.
So what you're thinking is that each instance of ${something} is actually some value, stored in ${something} being passed in to the Perl script? Is that roughly correct?
That's roughly correct, yes. Perl actually never sees them as variables. The interpolation is done by the shell (or make) before Perl comes into it. From its point of view, they're literal strings.
Finally, could the $${OBJECT} be right?
I don't think so. If that's really what perl sees, it's going to come out as an empty string because within the context of the Perl that's running, there is no $OBJECT variable with a value. I think that it's actually coming out as "\${OBJECT}", and winds up in the .depend file that way. This is one part of this whole thing I'm really not sure about, so take my words with salt, please.
|
|---|