>> Is it possible from within a function to get the name of the function I'm
>> in? e.g.
>>
>> **************************************
>> sub function23 { return "I am in function $<somevariable??>\n"; }
>>
>> print function23();
>> **************************************
>>
>> ... should return "I am in function function23"
>>
>> Does that make sense?
>>
>> I have properties that vary depending on what function I'm in, and I'm
>> trying to make the code more modular...
>
> $ perl -le'
> sub function23 { return "I am in function ", ( caller 0 )[ 3 ], "\n"; }
> print function23();
> '
> I am in function main::function23
>
>
> perldoc -f caller
You're amazing, John, not just because you seem to know everything, but that
you're also so often *available*.
Thanks!
- Bryan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/