added some documentation
fixed parsing for older versions of Perl