{"id":2511,"date":"2017-12-08T12:32:25","date_gmt":"2017-12-08T12:32:25","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2511"},"modified":"2025-02-01T23:07:59","modified_gmt":"2025-02-01T23:07:59","slug":"question-regarding-to-eval-function","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/question-regarding-to-eval-function\/","title":{"rendered":"Question Regarding to Eval Function"},"content":{"rendered":"<p><strong>scmuser created the topic: question regarding to eval function<\/strong><\/p>\n<p>I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line.<\/p>\n<p><code>eval \\'exec perl -S $0 ${1+\\\"$@\\\"}\\' if 0; $0<\/code><\/p>\n<p>for script name $@ set if error occur<\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: question regarding to eval function I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \\&#8217;exec perl -S $0 ${1+\\&#8221;$@\\&#8221;}\\&#8217; if 0; $0 for script name $@ set if error occur<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[14],"tags":[496],"class_list":["post-2511","post","type-post","status-publish","format-standard","hentry","category-perl","tag-eval"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2511"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2511\/revisions"}],"predecessor-version":[{"id":2512,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2511\/revisions\/2512"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}