# perlcritic -1 toster222.pl
No package-scoped "$VERSION" variable found at line 1, column 1. See page 404 of PBP. (Severity: 2)
Quotes used with a noisy string at line 8, column 15. See page 53 of PBP. (Severity: 2)
Magic punctuation variable $! used in interpolated string at line 8, column 43. See page 79 of PBP. (Severity: 2)
Return value of "close" ignored at line 13, column 1. Check the return value of "close" for success. (Severity: 2)
Return value of flagged function ignored - close at line 13, column 1. See pages 208,278 of PBP. (Severity: 1)
Return value of flagged function ignored - print at line 14, column 1. See pages 208,278 of PBP. (Severity: 1)
Return value of flagged function ignored - print at line 16, column 5. See pages 208,278 of PBP. (Severity: 1)
Я бы так написал вышеприведенный код:
pastebin.com/i8QYJk01