{"id":281,"date":"2010-08-24T09:47:07","date_gmt":"2010-08-24T09:47:07","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2010\/08\/24\/perl-scripting\/"},"modified":"2021-02-27T09:53:54","modified_gmt":"2021-02-27T09:53:54","slug":"perl-scripting","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/","title":{"rendered":"Perl Scripting Interview &#8211; Selected Questions"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4400\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png\" alt=\"perl-scripting-interview-selected-questions\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Can anyone help on these questions which i couldnt answer in my interview,because iam not sure on perl scripting iam learning the things in perl now.<\/p>\n<p>1.What standard Perl modules have you made use of, and why did you use them instead of the equivalent built-in functions?<\/p>\n<p>2.Write a statement that checks to make sure there are at least two command line arguments and exits with an error if not.<\/p>\n<p>3.How do you find the number of elements in an array?<\/p>\n<p>4.Write a regular expression that would match only the last director of a full path filename (and you don&#8217;t know the path ahead of time).\u00a0 Example: for &#8220;\/fee\/fi\/fo\/fum.txt&#8221; you would match &#8220;fo&#8221; with your regular expression<\/p>\n<p>5.Write a Perl script to get the machine host name and print it. No system command should be used; this script should work on Windows and Linux OS without any change.<br \/>\n6.Write a Perl script to check a directory exists or not and print proper message. The directory location will be passed as parameter while executing the script.<\/p>\n<p>Please help me out for the above questions.<\/p>\n<p style=\"margin-bottom: 0in;\">\n","protected":false},"excerpt":{"rendered":"<p>Can anyone help on these questions which i couldnt answer in my interview,because iam not sure on perl scripting iam [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":4400,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[52],"tags":[766,4199,175,4201,4203,4202,4197,4198,139,4200],"class_list":["post-281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions-answers","tag-interview","tag-interview-questions-of-perl-scripting","tag-perl","tag-perl-advance-interview-questions","tag-perl-job-interview-questions","tag-perl-regular-expression-interview-question","tag-perl-scripting","tag-perl-scripting-interview","tag-scripting","tag-selected-perl-interview-questions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Perl Scripting Interview - Selected Questions - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Perl Scripting Interview - Selected Questions - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Can anyone help on these questions which i couldnt answer in my interview,because iam not sure on perl scripting iam [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2010-08-24T09:47:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:53:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Perl Scripting Interview &#8211; Selected Questions\",\"datePublished\":\"2010-08-24T09:47:07+00:00\",\"dateModified\":\"2021-02-27T09:53:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/\"},\"wordCount\":195,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2010\\\/08\\\/perl-scripting-interview-se.png\",\"keywords\":[\"Interview\",\"Interview Questions of Perl Scripting\",\"Perl\",\"Perl Advance Interview Questions\",\"Perl Job Interview Questions\",\"Perl regular expression interview question\",\"Perl Scripting\",\"Perl Scripting Interview\",\"Scripting\",\"Selected Perl Interview Questions\"],\"articleSection\":[\"Interview Questions &amp; Answers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/\",\"name\":\"Perl Scripting Interview - Selected Questions - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2010\\\/08\\\/perl-scripting-interview-se.png\",\"datePublished\":\"2010-08-24T09:47:07+00:00\",\"dateModified\":\"2021-02-27T09:53:54+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2010\\\/08\\\/perl-scripting-interview-se.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2010\\\/08\\\/perl-scripting-interview-se.png\",\"width\":600,\"height\":400,\"caption\":\"perl-scripting-interview-selected-questions\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/perl-scripting\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Perl Scripting Interview &#8211; Selected Questions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Perl Scripting Interview - Selected Questions - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/","og_locale":"en_US","og_type":"article","og_title":"Perl Scripting Interview - Selected Questions - scmGalaxy","og_description":"Can anyone help on these questions which i couldnt answer in my interview,because iam not sure on perl scripting iam [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/","og_site_name":"scmGalaxy","article_published_time":"2010-08-24T09:47:07+00:00","article_modified_time":"2021-02-27T09:53:54+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Perl Scripting Interview &#8211; Selected Questions","datePublished":"2010-08-24T09:47:07+00:00","dateModified":"2021-02-27T09:53:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/"},"wordCount":195,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png","keywords":["Interview","Interview Questions of Perl Scripting","Perl","Perl Advance Interview Questions","Perl Job Interview Questions","Perl regular expression interview question","Perl Scripting","Perl Scripting Interview","Scripting","Selected Perl Interview Questions"],"articleSection":["Interview Questions &amp; Answers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/","name":"Perl Scripting Interview - Selected Questions - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png","datePublished":"2010-08-24T09:47:07+00:00","dateModified":"2021-02-27T09:53:54+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2010\/08\/perl-scripting-interview-se.png","width":600,"height":400,"caption":"perl-scripting-interview-selected-questions"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/perl-scripting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Perl Scripting Interview &#8211; Selected Questions"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/281\/revisions"}],"predecessor-version":[{"id":4401,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/281\/revisions\/4401"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/4400"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}