Debugging Perl References | topic started 3/21/2002; 7:12:05 AM last post 3/21/2002; 10:09:20 AM |
|
|
|
Michael Gage - Re: Debugging Perl References 3/21/2002; 10:09:20 AM (reads: 1158, responses: 0) |
Mark, One caution. If or when you move this subroutine to a macro file (e.g myPGmacros.pl) you will need to replace the ~~ by \ again. The thinking is as follows. In the problem files (.pg files) TeX is used more often than the fancier forms of perl, hence all of the backslashes are protected in favor of TeX and you need to use ~~ in order to obtain a perl backslash. For subroutines (the ones located in the .pl macro files) it seemed that TeX was not used extensively, but perl was. In these files all TeX commands need to have double backslashes: e.g. "\\alpha"" but the perl backslashes work in the normal perl fashion. ~~ has no meaning in these files. Hope this helps. This gotcha is one that I run into fairly frequently, but I haven't figured out any clever way to avoid it. Take care, Mike |