in reply to exit code from FILEHANDLE object.
You get 1 because close is successfull.
Please have a look at $? in perlvar.
Conway's Game of Life
Perl regular expressions
My Magic 8-Ball™
Results (194 votes). Check out past polls.