{"id":7644,"date":"2015-01-12T00:06:00","date_gmt":"2015-01-12T00:06:00","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=7644"},"modified":"2015-01-12T00:06:00","modified_gmt":"2015-01-12T00:06:00","slug":"perl-the-time-localtime","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/perl-the-time-localtime\/","title":{"rendered":"Perl:  the time:  localtime"},"content":{"rendered":"<h1>Tutoring computer science, you need to discuss the built-in functions of the language(s) you use. \u00a0The tutor opens a discussion about Perl&#8217;s handling of time.<\/h1>\n<p>Perl, apparently a language meant to process data in large organizations, has a few built-in ways to present the time.<\/p>\n<p>One of Perl&#8217;s time functions is <span style=\"font-family:monospace\">localtime<\/span>.  On my systems, these few lines<\/p>\n<p><span style=\"font-family:monospace;color:brown\">#!\/usr\/bin\/perl<br \/>\n$tim=localtime;<br \/>\nprint &#8220;The time is $tim&#8221;;<br \/>\n<\/span><br \/>\ngive output like<\/p>\n<p><span style=\"font-family:monospace\">The time is Sun Jan 11 15:43:32 2015<\/span><\/p>\n<p>The above code works for me on both Windows and Linux.  However, it uses only one aspect of Perl&#8217;s time handling.<\/p>\n<p>Speaking of time:  today, I won&#8217;t take much of yours:)  I will be discussing more about Perl&#8217;s built-in time features in future posts.<\/p>\n<p>Source:<\/p>\n<p>McGrath, Mike.  <em>Perl in easy steps.<\/em>  Southam:  Computer Step, 2004.<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutoring computer science, you need to discuss the built-in functions of the language(s) you use. \u00a0The tutor opens a discussion about Perl&#8217;s handling of time. Perl, apparently a language meant to process data in large organizations, has a few built-in &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/perl-the-time-localtime\/\"> <span class=\"screen-reader-text\">Perl:  the time:  localtime<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[423,173,422],"class_list":["post-7644","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-localtime","tag-perl-programming","tag-time"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/7644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=7644"}],"version-history":[{"count":16,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/7644\/revisions"}],"predecessor-version":[{"id":7660,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/7644\/revisions\/7660"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=7644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=7644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=7644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}