#!/usr/bin/perl use strict; use warnings; sub JAPH { Just ();}sub Just { another ();}sub another { Perl ();}sub Perl { hacker (",\n");}sub hacker { print((join' ',map{(split'::',(caller(3-$_))[3])[1]}(0..3)),@_);}&JA +PH;

Replies are listed 'Best First'.
Re: Fun with caller()
by cristian (Hermit) on May 30, 2005 at 14:27 UTC
    ja ja you like caller. This example is for explanation the obfus code #!/usr/bin/perl sub Just_another::Perl_hacker{(caller(0))[3]} #caller = procedure name => Just_another::Perl_hacker $_=Perl_hacker Just_another; #$_=Just_another::Perl_hacker stored ~s/_|::/ /g; #replace :: and _ for spaces on $_ print; #printing $_ => sub name clean