{"id":16496,"date":"2009-02-09T17:44:52","date_gmt":"2009-02-10T01:44:52","guid":{"rendered":"http:\/\/www.transterrestrial.com\/?p=16496"},"modified":"2009-02-09T17:45:49","modified_gmt":"2009-02-10T01:45:49","slug":"perl-problem","status":"publish","type":"post","link":"https:\/\/www.transterrestrial.com\/wordpress\/2009\/02\/09\/perl-problem\/","title":{"rendered":"Perl Problem"},"content":{"rendered":"<p>I&#8217;m going crazy with a script.  Here&#8217;s the code:<\/p>\n<blockquote>\n<p>$parent = @line_elements[8];<br \/>\n\t\t$lower_req = @line_elements[1];<br \/>\nprint DEBUG &#8220;BEGIN \\$lower_req is $lower_req, \\$parent is $parent, \\$req_num is $req_num.\\n&#8221;;<br \/>\n\t\tif ($req_num eq $parent) {<br \/>\nprint DEBUG &#8220;\\$req_num is $req_num, \\$parent is $parent, got a match!\\n&#8221;;<br \/>\n}\n<\/p>\n<\/blockquote>\n<p>And here&#8217;s the output:<\/p>\n<blockquote>\n<p>BEGIN $lower_req is &#8220;2.1.1&#8221;, $parent is &#8220;1.1&#8221;<br \/>\n, $req_num is &#8220;1.1&#8221;.<br \/>\nBEGIN $lower_req is &#8220;2.1.2&#8221;, $parent is &#8220;1.1&#8221;<br \/>\n, $req_num is &#8220;1.1&#8221;.<br \/>\nBEGIN $lower_req is &#8220;2.1.3&#8221;, $parent is &#8220;1.1&#8221;<br \/>\n, $req_num is &#8220;1.1&#8221;.<br \/>\nBEGIN $lower_req is &#8220;2.1.4&#8221;, $parent is &#8220;1.1&#8221;<br \/>\n, $req_num is &#8220;1.1&#8221;.<br \/>\nBEGIN $lower_req is &#8220;2.1.5&#8221;, $parent is &#8220;1.1&#8221;<br \/>\n, $req_num is &#8220;1.1&#8221;.<\/p>\n<\/blockquote>\n<p>Note that in each case, that $req_num is equal to $parent, and the line should be repeated with the statement that a match was found.  Can another pair of eyes tell me why it&#8217;s not?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m going crazy with a script. Here&#8217;s the code: $parent = @line_elements[8]; $lower_req = @line_elements[1]; print DEBUG &#8220;BEGIN \\$lower_req is $lower_req, \\$parent is $parent, \\$req_num is $req_num.\\n&#8221;; if ($req_num eq $parent) { print DEBUG &#8220;\\$req_num is $req_num, \\$parent is $parent, got a match!\\n&#8221;; } And here&#8217;s the output: BEGIN $lower_req is &#8220;2.1.1&#8221;, $parent is &#8220;1.1&#8221; &hellip; <a href=\"https:\/\/www.transterrestrial.com\/wordpress\/2009\/02\/09\/perl-problem\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Perl Problem<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,27],"tags":[],"class_list":["post-16496","post","type-post","status-publish","format-standard","hentry","category-general","category-mathematics"],"_links":{"self":[{"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/posts\/16496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/comments?post=16496"}],"version-history":[{"count":2,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/posts\/16496\/revisions"}],"predecessor-version":[{"id":16498,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/posts\/16496\/revisions\/16498"}],"wp:attachment":[{"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/media?parent=16496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/categories?post=16496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.transterrestrial.com\/wordpress\/wp-json\/wp\/v2\/tags?post=16496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}