--- a/plugins/perl/perl.c
+++ b/plugins/perl/perl.c
@@ -1033,7 +1033,7 @@
 
 	dXSARGS;
 
-	if (items != 4) {
+	if (items != 5) {
 		xchat_print (ph,
 						 "Usage: Xchat::Internal::hook_fd(fd, callback, flags, userdata)");
 	} else {