Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
output:C:\>perl -le "eval q!die!;print $@"
another example:Died at (eval 1) line 1.
output:C:\>perl -le "eval q!print $^O! for 1..10; eval q!die!;print $@"
The question is, can I access that counter somehow? For example, I may do some evals myself, but some other code can also do that, so I can't use a simple $counter++ before eval()ing.MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 Died at (eval 11) line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: is it possible to access eval() counter?
by Corion (Patriarch) on Jun 29, 2006 at 11:54 UTC | |
by tye (Sage) on Jun 30, 2006 at 18:11 UTC | |
|
Re: is it possible to access eval() counter?
by Sidhekin (Priest) on Jun 29, 2006 at 10:48 UTC | |
|
Re: is it possible to access eval() counter?
by radiantmatrix (Parson) on Jun 29, 2006 at 16:31 UTC | |
|
Re: is it possible to access eval() counter?
by hv (Prior) on Jun 30, 2006 at 11:48 UTC | |
by Anonymous Monk on Jun 30, 2006 at 14:19 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |