{"id":349565,"date":"2023-06-29T15:03:15","date_gmt":"2023-06-29T15:03:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=349565"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=349565","title":{"rendered":"<span>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430: Perl \u0438 Golang<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d \u043e\u043f\u044b\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u043e\u0432 Perl \u0438 Golang \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u043e\u0440\u043e\u0434\u0430\u0442\u043e\u0433\u043e \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0434\u0430\u0432\u043d\u043e \u0432 \u043c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u0438 \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433 \u0431\u044b \u043c\u043d\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043d\u043e\u0439 \u0442\u0440\u0443\u0434, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043b\u043e\u0433 \u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0442.\u0434. \u0418 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Perl. \u041e\u043d \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043b\u043e\u0447\u043a\u043e\u0439-\u0432\u044b\u0440\u0443\u0447\u0430\u043b\u043e\u0447\u043a\u043e\u0439. \u0412\u043d\u044f\u0442\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/two-wrongs.com\/why-perl\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u043e\u0439<\/a> \u0437\u0430\u043c\u0435\u0442\u043a\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Perl:<\/p>\n<ul>\n<li>\n<p>\u041e\u043d \u0432\u0435\u0437\u0434\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a \u043d\u043e\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u042f \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 Perl, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0438\u0448\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f, \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 10 \u043b\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u041b\u044e\u0431\u043e\u0439 \u0443\u0432\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0431\u044f \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u043c \u0443\u043a\u043b\u043e\u043d\u043e\u043c. \u041c\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u043a\u0441\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0431\u044d\u043a\u0430\u043f\u0430 \u0438 \u0442.\u0434. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 <a href=\"https:\/\/metacpan.org\/\" rel=\"noopener noreferrer nofollow\">CPAN<\/a> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0443\u0447\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0441 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043a\u043e\u0434\u0443.<\/p>\n<h2>\u0427\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u043e\u0435<\/h2>\n<p>\u0418 \u0432\u043e\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 (\u0442\u043e\u0447\u043d\u0435\u0435 \u044f \u0441\u0430\u043c \u043d\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0441\u044f :-)), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0440\u0433\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0435 api \u043f\u043e http \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (json) \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0432 noSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Perl, \u0442.\u043a. \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0438\u043a\u0442\u043e \u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u0422\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Golang, \u0432\u0435\u0434\u044c, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442  \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u043e\u0432. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0434\u0430 \u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u043e\u0435, \u043d\u043e \u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430. <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a Golang \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a, \u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 (\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e) \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438c\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 Perl \u0438 Golang \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u043e\u0434\u043d\u043e\u0439 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0439\u0442\u0438 500-\u0435 \u043a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 access.log \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c ~1G<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 sql \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 12200 \u0441\u0442\u0440\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u0432\u044b\u0434\u0430\u0447\u0438 \u0438 \u0434\u0430\u0442\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 www.example.com<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/h2>\n<p>\u0414\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <code>time<\/code>, \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430. \u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0431\u044b\u043b\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 (<code>for i in $(seq 1 3);do ps -eo rss,command | grep script | grep -vE 'grep|vim|go run'; sleep 1 ;done<\/code>), \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 (\u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430) \u0442\u0440\u0438 \u0440\u0430\u0437\u0430, \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 1. \u041d\u0430\u0439\u0442\u0438 500-\u0435 \u043a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 access.log \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c ~1G<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8);  open FILE, \"&lt;\", 'access.log' or die $!; while (&lt;FILE>) {     my @a = split \/\\s+\/;     print if $a[8] eq '500'; } close FILE;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"bufio\"     \"fmt\"     \"log\"     \"os\"     \"regexp\" )  func main() {     file, err := os.Open(\"access.log\")     if err != nil {         log.Fatalf(\"%s\", err)     }     fileScanner := bufio.NewScanner(file)      for fileScanner.Scan() {         s := regexp.MustCompile(`\\s+`).Split(fileScanner.Text(), 10)         if s[8] == \"500\" {             fmt.Println(s)         }     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0435\u0440\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m16,132s<br \/>user    0m15,758s<br \/>sys     0m0,373s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m24,357s<br \/>user    0m24,375s<br \/>sys     0m0,877s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">6400 perl .\/script.pl<br \/>6400 perl .\/script.pl<br \/>6400 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">9608 .\/script<br \/>9820 .\/script<br \/>9540 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 2. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 sql \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 12200 \u0441\u0442\u0440\u043e\u043a)<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8); use DBI;  my $dbh = DBI->connect(     \"dbi:Pg:dbname='exp';host='10.10.10.1';port=5432\",     'exp', '111',     {AutoCommit => 1, RaiseError => 1, PrintError => 0, pg_enable_utf8 => 1, ShowErrorStatement => 0} );  my $sth = $dbh->prepare('SELECT deal_city_id, \"ShortName\", \"FullName\" FROM public.deal_city ORDER BY deal_city_id'); $sth->execute(); while (my $ref = $sth->fetchrow_hashref) {     print $ref->{deal_city_id}.' '.$ref->{ShortName}.' '.$ref->{FullName}. \"\\n\"; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"database\/sql\"     \"fmt\"     \"log\"      _ \"github.com\/lib\/pq\" )  func main() {     db, err := sql.Open(\"postgres\", \"host=10.10.10.1 port=5432 user=exp password=111 dbname=exp sslmode=disable\")     if err != nil {         log.Fatal(err)     }      rows, err := db.Query(\"SELECT deal_city_id, \\\"ShortName\\\", \\\"FullName\\\" FROM public.deal_city ORDER BY deal_city_id\")     if err != nil {         log.Fatal(err)     }     defer rows.Close()      var (         deal_city_id int         ShortName    string         FullName     string     )     for rows.Next() {         err := rows.Scan(&amp;deal_city_id, &amp;ShortName, &amp;FullName)         if err != nil {             log.Fatal(err)         }         fmt.Printf(\"%v %s %s\\n\", deal_city_id, ShortName, FullName)     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m2,885s<br \/>user    0m0,071s<br \/>sys     0m0,032s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m2,790s<br \/>user    0m0,030s<br \/>sys     0m0,044s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">15232 perl .\/script.pl<br \/>15872 perl .\/script.pl<br \/>16768 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">6896 .\/script<br \/>9036 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 3. \u0423\u0437\u043d\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u0432\u044b\u0434\u0430\u0447\u0438 \u0438 \u0434\u0430\u0442\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 www.example.com<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use Crypt::OpenSSL::X509; use IO::Socket::SSL;  my $client = IO::Socket::SSL->new(     PeerHost            => \"www.example.com\",     PeerPort            => 443,     SSL_verify_callback => \\&amp;verify_cert, ) or die \"error=$!, ssl_error=$SSL_ERROR\"; $client->close();  sub verify_cert {     return 1 if $_[5] != 0;     my $cert_pem = Net::SSLeay::PEM_get_string_X509($_[4]);     my $x509 = Crypt::OpenSSL::X509->new_from_string($cert_pem);     print $x509->subject()   . \"\\n\";     print $x509->notBefore() . \"\\n\";     print $x509->notAfter()  . \"\\n\";     return 1; }<\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>C=US, ST=California, L=Los Angeles, O=InternetCorporationforAssignedNamesandNumbers, CN=www.example.org Jan 13 00:00:00 2023 GMT Feb 13 23:59:59 2024 GMT<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"crypto\/tls\"     \"fmt\" )  func main() {     conn, err := tls.Dial(\"tcp\", \"www.example.com:443\", &amp;tls.Config{InsecureSkipVerify: true})     if err != nil {         panic(\"failed to connect: \" + err.Error())     }     defer conn.Close()      cs := conn.ConnectionState()     for _, cert := range cs.PeerCertificates {         fmt.Printf(\"%v\\n\", cert.Subject)         fmt.Printf(\"%v\\n\", cert.NotBefore)         fmt.Printf(\"%v\\n\", cert.NotAfter)         break     } }<\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>CN=www.example.org,O=Internet\u00a0Corporation\u00a0for\u00a0Assigned\u00a0Names\u00a0and\u00a0Numbers,L=Los Angeles,ST=California,C=US 2023-01-13 00:00:00 +0000 UTC 2024-02-13 23:59:59 +0000 UTC<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m0,531s<br \/>user    0m0,051s<br \/>sys     0m0,012s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m0,441s<br \/>user    0m0,002s<br \/>sys     0m0,004s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">22732 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">9900 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 4. \u041f\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json<\/h4>\n<p>\u042d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438. \u0414\u0435\u043b\u043e \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Perl \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0435\u0442 json \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0430\u0440\u0441\u0438\u0442 \u0435\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u0441\u0432\u043e\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0445\u0435\u0448\u0438) \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c\u0438. \u0412 Golang \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u0441\u044c json (\u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b!) \u0432 \u0442\u0438\u043f\u0430\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/articles\/502176\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u044e\u0430\u043d\u0441\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 json \u0432 Golang, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0442\u0440\u0430\u0433\u0435\u0434\u0438\u0438 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043f\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043e \u0432\u0441\u044e \u0436\u0438\u0437\u043d\u044c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u0425\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c json, \u0430 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 json \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 json \u043e\u0431\u044a\u0435\u043a\u0442. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430 Golang, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c, \u0440\u0430\u0434\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 Perl, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Golang, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043d\u0430 Perl, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0431\u044b\u043b\u0430 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"encoding\/json\"     \"fmt\" )  type Developer struct {     RawValue string }  func (d *Developer) UnmarshalJSON(data []byte) error {     d.RawValue = string(data)     return nil }  func main() {     jsonStr := `[         {\"id\":1,\"name\":\"Larry\"},         {\"id\":2,\"name\":\"Robert\"},         {\"id\":3,\"name\":\"Rob\"},         {\"id\":4,\"name\":\"Ken\"}     ]`      developers := []Developer{}     if err := json.Unmarshal([]byte(jsonStr), &amp;developers); err != nil {         panic(err)     }     for _, d := range developers {         \/\/fmt.Printf(\"%s --- is %T\\n\", d.RawValue, d.RawValue)         fmt.Printf(\"%s\\n\", d.RawValue)     } } <\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>{\"id\":1,\"name\":\"Larry\"} {\"id\":2,\"name\":\"Robert\"} {\"id\":3,\"name\":\"Rob\"} {\"id\":4,\"name\":\"Ken\"}<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8); use JSON ();  my $jsonStr = '[     {\"id\":1,\"name\":\"Larry\"},     {\"id\":2,\"name\":\"Robert\"},     {\"id\":3,\"name\":\"Rob\"},     {\"id\":4,\"name\":\"Ken\"} ]';  my $developers = eval {     JSON     ->new     ->filter_json_object(sub{JSON::encode_json(shift)})     ->decode($jsonStr) }; die $@ if $@; print $_ . \"\\n\" for @$developers; <\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>{\"id\":1,\"name\":\"Larry\"} {\"id\":2,\"name\":\"Robert\"} {\"name\":\"Rob\",\"id\":3} {\"name\":\"Ken\",\"id\":4}<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0437\u0430\u043c\u0435\u0440\u0430\u043c\u0438, \u0442.\u043a. \u044d\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e. \u0412\u0437\u0433\u043b\u044f\u043d\u0443\u0432 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435. Golang \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0435\u0441\u044c json, \u0430 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438. Perl \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0430\u0440\u0441\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0437\u0430\u0442\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0438 \u0445\u0435\u0448\u0438 \u0438 \u0443\u0436\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438, \u0430 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438 \u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0445\u0435\u0448, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043a\u043b\u044e\u0447\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 json \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u044b. <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#8212; \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0423 \u043e\u0431\u043e\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043a\u0443\u0447\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e\u0442 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0443\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f &#8212; \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u0442\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c (\u0437\u0430\u0434\u0430\u0447\u0430 1) Perl \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0435: \u043e\u043d \u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442, \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u043e\u0442 <a href=\"https:\/\/gist.github.com\/msoap\/8123207\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e Perl \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u044e \u043a\u043e\u0434 \u043d\u0430 Golang \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435. \u042f \u0431\u0443\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0430\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0435\u0439. \u041d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443: \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043d\u0430 Perl \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0438 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u0436\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 DateTime), \u0442\u043e \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e Perl \u0441\u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441 Golang \u0438 \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u0435\u0442 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445.<\/p>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 Perl \u0447\u0443\u0442\u043e\u043a \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c\u043e &#8212; Golang \u044f\u0437\u044b\u043a \u0441\u043e \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0438\u0437 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437\u0443\u0447\u0430\u0442\u044c Golang \u043f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0433\u043e\u043b\u0435\u0442\u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Perl \u0441\u043b\u043e\u0436\u043d\u043e\u0432\u0430\u0442\u043e, \u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e \u0441\u0438\u043b\u0430\u043c \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430\u043c;<\/p>\n<\/li>\n<li>\n<p>Golang \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Perl \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/744380\/\"> https:\/\/habr.com\/ru\/articles\/744380\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442\u0440\u0430\u0436\u0435\u043d \u043e\u043f\u044b\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u043e\u0432 Perl \u0438 Golang \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u043e\u0440\u043e\u0434\u0430\u0442\u043e\u0433\u043e \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u0435\u043d<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0434\u0430\u0432\u043d\u043e \u0432 \u043c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u0438 \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433 \u0431\u044b \u043c\u043d\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043d\u043e\u0439 \u0442\u0440\u0443\u0434, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043b\u043e\u0433 \u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0442.\u0434. \u0418 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Perl. \u041e\u043d \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043b\u043e\u0447\u043a\u043e\u0439-\u0432\u044b\u0440\u0443\u0447\u0430\u043b\u043e\u0447\u043a\u043e\u0439. \u0412\u043d\u044f\u0442\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"https:\/\/two-wrongs.com\/why-perl\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u043e\u0439<\/a> \u0437\u0430\u043c\u0435\u0442\u043a\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 Perl:<\/p>\n<ul>\n<li>\n<p>\u041e\u043d \u0432\u0435\u0437\u0434\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a \u043d\u043e\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u042f \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 Perl, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0438\u0448\u0443 \u0441\u0435\u0433\u043e\u0434\u043d\u044f, \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 10 \u043b\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u041b\u044e\u0431\u043e\u0439 \u0443\u0432\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0431\u044f \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u043c \u0443\u043a\u043b\u043e\u043d\u043e\u043c. \u041c\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u043a\u0441\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0431\u044d\u043a\u0430\u043f\u0430 \u0438 \u0442.\u0434. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 <a href=\"https:\/\/metacpan.org\/\" rel=\"noopener noreferrer nofollow\">CPAN<\/a> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0443\u0447\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0441 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043a\u043e\u0434\u0443.<\/p>\n<h2>\u0427\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u0435\u043d\u044c\u043a\u043e\u0435<\/h2>\n<p>\u0418 \u0432\u043e\u0442 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 (\u0442\u043e\u0447\u043d\u0435\u0435 \u044f \u0441\u0430\u043c \u043d\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0441\u044f :-)), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0440\u0433\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0435 api \u043f\u043e http \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (json) \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0432 noSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Perl, \u0442.\u043a. \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u043d\u0438\u043a\u0442\u043e \u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u0422\u043e\u0433\u0434\u0430 \u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Golang, \u0432\u0435\u0434\u044c, \u043f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442  \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0430\u0434\u043c\u0438\u043d\u043e\u0432. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0434\u0430 \u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u043e\u0435, \u043d\u043e \u0442\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430. <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a Golang \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a, \u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 (\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e) \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438c\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 Perl \u0438 Golang \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u043e\u0434\u043d\u043e\u0439 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b: \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0439\u0442\u0438 500-\u0435 \u043a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 access.log \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c ~1G<\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 sql \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 12200 \u0441\u0442\u0440\u043e\u043a)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u0432\u044b\u0434\u0430\u0447\u0438 \u0438 \u0434\u0430\u0442\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 www.example.com<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432<\/h2>\n<p>\u0414\u043b\u044f \u0437\u0430\u043c\u0435\u0440\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <code>time<\/code>, \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430. \u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0431\u044b\u043b\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 (<code>for i in $(seq 1 3);do ps -eo rss,command | grep script | grep -vE 'grep|vim|go run'; sleep 1 ;done<\/code>), \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f \u0437\u0430\u043c\u0435\u0440 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 (\u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430) \u0442\u0440\u0438 \u0440\u0430\u0437\u0430, \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 1. \u041d\u0430\u0439\u0442\u0438 500-\u0435 \u043a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 access.log \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c ~1G<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8);  open FILE, \"&lt;\", 'access.log' or die $!; while (&lt;FILE>) {     my @a = split \/\\s+\/;     print if $a[8] eq '500'; } close FILE;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"bufio\"     \"fmt\"     \"log\"     \"os\"     \"regexp\" )  func main() {     file, err := os.Open(\"access.log\")     if err != nil {         log.Fatalf(\"%s\", err)     }     fileScanner := bufio.NewScanner(file)      for fileScanner.Scan() {         s := regexp.MustCompile(`\\s+`).Split(fileScanner.Text(), 10)         if s[8] == \"500\" {             fmt.Println(s)         }     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0435\u0440\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m16,132s<br \/>user    0m15,758s<br \/>sys     0m0,373s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m24,357s<br \/>user    0m24,375s<br \/>sys     0m0,877s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">6400 perl .\/script.pl<br \/>6400 perl .\/script.pl<br \/>6400 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">9608 .\/script<br \/>9820 .\/script<br \/>9540 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 2. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 sql \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 12200 \u0441\u0442\u0440\u043e\u043a)<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8); use DBI;  my $dbh = DBI->connect(     \"dbi:Pg:dbname='exp';host='10.10.10.1';port=5432\",     'exp', '111',     {AutoCommit => 1, RaiseError => 1, PrintError => 0, pg_enable_utf8 => 1, ShowErrorStatement => 0} );  my $sth = $dbh->prepare('SELECT deal_city_id, \"ShortName\", \"FullName\" FROM public.deal_city ORDER BY deal_city_id'); $sth->execute(); while (my $ref = $sth->fetchrow_hashref) {     print $ref->{deal_city_id}.' '.$ref->{ShortName}.' '.$ref->{FullName}. \"\\n\"; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"database\/sql\"     \"fmt\"     \"log\"      _ \"github.com\/lib\/pq\" )  func main() {     db, err := sql.Open(\"postgres\", \"host=10.10.10.1 port=5432 user=exp password=111 dbname=exp sslmode=disable\")     if err != nil {         log.Fatal(err)     }      rows, err := db.Query(\"SELECT deal_city_id, \\\"ShortName\\\", \\\"FullName\\\" FROM public.deal_city ORDER BY deal_city_id\")     if err != nil {         log.Fatal(err)     }     defer rows.Close()      var (         deal_city_id int         ShortName    string         FullName     string     )     for rows.Next() {         err := rows.Scan(&amp;deal_city_id, &amp;ShortName, &amp;FullName)         if err != nil {             log.Fatal(err)         }         fmt.Printf(\"%v %s %s\\n\", deal_city_id, ShortName, FullName)     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m2,885s<br \/>user    0m0,071s<br \/>sys     0m0,032s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m2,790s<br \/>user    0m0,030s<br \/>sys     0m0,044s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">15232 perl .\/script.pl<br \/>15872 perl .\/script.pl<br \/>16768 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">6896 .\/script<br \/>9036 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 3. \u0423\u0437\u043d\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u0432\u044b\u0434\u0430\u0447\u0438 \u0438 \u0434\u0430\u0442\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ssl \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 www.example.com<\/h4>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use Crypt::OpenSSL::X509; use IO::Socket::SSL;  my $client = IO::Socket::SSL->new(     PeerHost            => \"www.example.com\",     PeerPort            => 443,     SSL_verify_callback => \\&amp;verify_cert, ) or die \"error=$!, ssl_error=$SSL_ERROR\"; $client->close();  sub verify_cert {     return 1 if $_[5] != 0;     my $cert_pem = Net::SSLeay::PEM_get_string_X509($_[4]);     my $x509 = Crypt::OpenSSL::X509->new_from_string($cert_pem);     print $x509->subject()   . \"\\n\";     print $x509->notBefore() . \"\\n\";     print $x509->notAfter()  . \"\\n\";     return 1; }<\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>C=US, ST=California, L=Los Angeles, O=InternetCorporationforAssignedNamesandNumbers, CN=www.example.org Jan 13 00:00:00 2023 GMT Feb 13 23:59:59 2024 GMT<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"crypto\/tls\"     \"fmt\" )  func main() {     conn, err := tls.Dial(\"tcp\", \"www.example.com:443\", &amp;tls.Config{InsecureSkipVerify: true})     if err != nil {         panic(\"failed to connect: \" + err.Error())     }     defer conn.Close()      cs := conn.ConnectionState()     for _, cert := range cs.PeerCertificates {         fmt.Printf(\"%v\\n\", cert.Subject)         fmt.Printf(\"%v\\n\", cert.NotBefore)         fmt.Printf(\"%v\\n\", cert.NotAfter)         break     } }<\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>CN=www.example.org,O=Internet\u00a0Corporation\u00a0for\u00a0Assigned\u00a0Names\u00a0and\u00a0Numbers,L=Los Angeles,ST=California,C=US 2023-01-13 00:00:00 +0000 UTC 2024-02-13 23:59:59 +0000 UTC<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"center\">script.pl<\/p>\n<\/td>\n<td>\n<p align=\"center\">script.go<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">real    0m0,531s<br \/>user    0m0,051s<br \/>sys     0m0,012s<\/p>\n<\/td>\n<td>\n<p align=\"left\">real    0m0,441s<br \/>user    0m0,002s<br \/>sys     0m0,004s<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"169\" width=\"169\">\n<p align=\"left\">\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 (in kilobytes)<\/p>\n<\/td>\n<td data-colwidth=\"266\" width=\"266\">\n<p align=\"left\">22732 perl .\/script.pl<\/p>\n<\/td>\n<td>\n<p align=\"left\">9900 .\/script<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 4. \u041f\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c json<\/h4>\n<p>\u042d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b\u0438. \u0414\u0435\u043b\u043e \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Perl \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0435\u0442 json \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0430\u0440\u0441\u0438\u0442 \u0435\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u0441\u0432\u043e\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0445\u0435\u0448\u0438) \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c\u0438. \u0412 Golang \u0432\u0441\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u0441\u044c json (\u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b!) \u0432 \u0442\u0438\u043f\u0430\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/articles\/502176\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u044e\u0430\u043d\u0441\u044b \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 json \u0432 Golang, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0442\u0440\u0430\u0433\u0435\u0434\u0438\u0438 \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043f\u0438\u0441\u0430\u0432\u0448\u0435\u0433\u043e \u0432\u0441\u044e \u0436\u0438\u0437\u043d\u044c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u0425\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c json, \u0430 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 json \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 json \u043e\u0431\u044a\u0435\u043a\u0442. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430 Golang, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c, \u0440\u0430\u0434\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 Perl, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Golang, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043d\u0430 Perl, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0431\u044b\u043b\u0430 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>script.go<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">package main  import (     \"encoding\/json\"     \"fmt\" )  type Developer struct {     RawValue string }  func (d *Developer) UnmarshalJSON(data []byte) error {     d.RawValue = string(data)     return nil }  func main() {     jsonStr := `[         {\"id\":1,\"name\":\"Larry\"},         {\"id\":2,\"name\":\"Robert\"},         {\"id\":3,\"name\":\"Rob\"},         {\"id\":4,\"name\":\"Ken\"}     ]`      developers := []Developer{}     if err := json.Unmarshal([]byte(jsonStr), &amp;developers); err != nil {         panic(err)     }     for _, d := range developers {         \/\/fmt.Printf(\"%s --- is %T\\n\", d.RawValue, d.RawValue)         fmt.Printf(\"%s\\n\", d.RawValue)     } } <\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>{\"id\":1,\"name\":\"Larry\"} {\"id\":2,\"name\":\"Robert\"} {\"id\":3,\"name\":\"Rob\"} {\"id\":4,\"name\":\"Ken\"}<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>script.pl<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"perl\">#!\/usr\/bin\/env perl  use strict; use warnings; use utf8; use open qw(:std :utf8); use JSON ();  my $jsonStr = '[     {\"id\":1,\"name\":\"Larry\"},     {\"id\":2,\"name\":\"Robert\"},     {\"id\":3,\"name\":\"Rob\"},     {\"id\":4,\"name\":\"Ken\"} ]';  my $developers = eval {     JSON     ->new     ->filter_json_object(sub{JSON::encode_json(shift)})     ->decode($jsonStr) }; die $@ if $@; print $_ . \"\\n\" for @$developers; <\/code><\/pre>\n<p>\u0432\u044b\u0432\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<pre><code>{\"id\":1,\"name\":\"Larry\"} {\"id\":2,\"name\":\"Robert\"} {\"name\":\"Rob\",\"id\":3} {\"name\":\"Ken\",\"id\":4}<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0437\u0430\u043c\u0435\u0440\u0430\u043c\u0438, \u0442.\u043a. \u044d\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e. \u0412\u0437\u0433\u043b\u044f\u043d\u0443\u0432 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435. Golang \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0435\u0441\u044c json, \u0430 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438. Perl \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0430\u0440\u0441\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0437\u0430\u0442\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0438 \u0445\u0435\u0448\u0438 \u0438 \u0443\u0436\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438, \u0430 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438 \u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0445\u0435\u0448, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043a\u043b\u044e\u0447\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 json \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u044b. <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#8212; \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0423 \u043e\u0431\u043e\u0438\u0445<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-349565","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=349565"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349565\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}