On 8/3/07, vishnu <[EMAIL PROTECTED]> wrote: snip > I think this stuff is going a bit complicated.. please give my some links on > perl concepts. i have fome pdf files from perk.org.. but they are a bit > basic and not deep into such things. > > please refer dome books that might by of some use to me :) snip
Programming Perl (the Camel): http://www.oreilly.com/catalog/pperl3/ Perl Best Practices: http://www.oreilly.com/catalog/perlbp/index.html Object Oriented Perl: http://www.manning.com/conway/ Higher-Order Perl: http://hop.perl.plover.com/ And, of course, the perldocs themselves (see perldoc perl or http://perldoc.perl.org/) snip > can u explain this part in detail > > if (-x $perl_binary) { > $ENV{'VMWARE_PERL_NESTED_EXEC'} = 1; > exec $perl_binary, '-I'.$libdir.'/perl5/site_perl/5.005',$0, > @ARGV; > } snip -x is a file test operator, it test to see if the file exists and is executable. So this is making sure it can execute the file whose name is in $perl_binary. %ENV is a hash that holds the current state of the environment. Changing a value in the hash changes the environmental variable associated with it. So this is setting the environmental variable VMWARE_PERL_NESTED_EXEC to 1. exec is a function that replaces the currently running process with the one specified. $0 is the name of the currently running script @ARGV are the arguments to the script So this is replacing the current version of the Perl interpreter with the one specified in the VMWare config file. It is probable, but I am not certain, that the VMWARE_PERL_NESTED_EXEC environmental variable is there to prevent infinite recursion. Now, why VMWare needs it's version of Perl instead of the system copy is a mystery to me. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/