On Wed, Jun 18, 2003 at 12:38:35AM -0400 Shishir K. Singh wrote: > I am trying to locate the perl code for the opcode -B or stat but I > am getting lost in the maze of all the files. Would appreciate it if > someone could pls direct me to the actual file where the algo for -B > file test switch lies.
It is in the file pp_sys.c. Perl built-ins are usually declared like PP(pp_split) { ... } In pp_sys.c you will find most of the system related built-ins. The filetest operators are to be found in the PP(pp_ft*) functions. For instance PP(pp_ftsize) is the '-s' operator. '-B' is PP(pp_ftbinary) which just calls PP(pp_fttext). What to return is presumable based on the current OP (which is OP_FTTEXT for -T and OP_FTBINARY for -B). stat() is PP(pp_stat). If you want to find yourself around the Perl source, a good primary source of information is 'perldoc perlhack.pod'. It's giving an overview of how the interpreter works. To understand the source-code however, you need to have read perlguts.pod, perlcall.pod and keep perlapi.pod around as reference. And even that is only a fraction of what you actually need. Tassilo -- $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({ pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#; $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]