Try &?ROUTINE.name -- that should get you the sub's name. On Tue, Mar 7, 2017 at 11:30 PM, ToddAndMargo <toddandma...@zoho.com> wrote:
> Hi All, > > I am trying to print out the name of the sub I am in. > > Reference: > https://docs.perl6.org/language/variables#index-entry-%26%3FROUTINE > &?ROUTINE Which routine am I in? > > > <code> > sub LinuxCheck () { print &?ROUTINE ~ " " ~ "$*DISTRO $OS\n"; } > </code> > > <unit> rhel linux > > &?ROUTINE resolves to "<unit>", which is not the name of the sub. What am > I missing? > > > Many thanks, > -T > > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Computers are like air conditioners. > They malfunction when you open windows > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >