defined checks whether or not a key is defined in a hash, in this context it will return true if the name was found in your file 1. lc turns a string into lower case, adding a bit of robustness to the code (I assumed you wanted to do case insensitive matching).
Generally, there is excellent documentation at http://perldoc.perl.org should you be unfamiliar with a specific function.
UPDATE: It seems I was a bit tired when writing in this thread. While defined does the job, one really should be using exists. Apologies! A simple introduction into hashes can be found here http://www.tutorialspoint.com/perl/perl_hashes.htm but googling "perl hash" will lead to many more good hits.
In reply to Re^4: Write in files
by hdb
in thread Write in files
by lolz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |