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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |