At some point after perl 5.18, e.g. in perl 5.22, some usages of curly braces and .. in regex are syntax errors. These were fixed in later releases of Greenstone such as after 3.09, but here are 1. patches for GS2.87 and 2. Updated patch for GS3.09: DirectoryPlugin.pm no longer included as the attempt to fix it was unnecessary and not correct. Instructions are in the 3.09 and 2.87 release notes.