Use perl -MO=Concise,-exec -e'...code...' to find the name of the operators into which your code compiles. Then grep the Perl source for pp_name.

For example, you asked about reverse.

$ perl -MO=Concise,-exec -e'@b = reverse @a' 1 <0> enter 2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <0> pushmark s 5 <#> gv[*a] s 6 <1> rv2av[t4] lK/1 7 <@> reverse[t5] lK/1 <----------- 8 <0> pushmark s 9 <#> gv[*b] s a <1> rv2av[t2] lKRM*/1 b <2> aassign[t6] vKS c <@> leave[1 ref] vKP/REFC -e syntax OK $ grep -nR pp_reverse . ./lib/B/Deparse.pm:3130:sub pp_reverse { listop(@_, "reverse") } ./opcode.h:1143: Perl_pp_reverse, ./pp.c:5508:PP(pp_reverse) <----------- ./pp_proto.h:215:PERL_CALLCONV OP *Perl_pp_reverse(pTHX); $ perl -ne'print if 5508 .. /^}/' pp.c PP(pp_reverse) { dSP; dMARK; ... RETURN; }

In reply to Re: Perl built-in functions source code by ikegami
in thread Perl built-in functions source code by prat7434

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.