{"id":6341,"date":"2014-11-09T20:44:28","date_gmt":"2014-11-09T20:44:28","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=6341"},"modified":"2014-11-09T20:44:28","modified_gmt":"2014-11-09T20:44:28","slug":"perl-repeated-text","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/perl-repeated-text\/","title":{"rendered":"Perl:  repeated text"},"content":{"rendered":"<h1>Tutoring Perl programming, you are aware of so many little tricks Perl contains for doing specific tasks. \u00a0The tutor shares a fun one.<\/h1>\n<p>&nbsp;<br \/>\nI recall, when I was a kid, a common trick to show off was to fill up the computer screen with your name.  A kid with a little programming instruction could easily do it; a kid with no knowledge of programming, had no hope of pulling it off.<\/p>\n<p>At the time, I had no knowledge of programming.  However, I saw a kid do the trick on a Commodore Vic-20 (I&#8217;m really showing my age here).  For years I wondered how he did it.<\/p>\n<p>The kid likely did it in BASIC; Perl wasn&#8217;t even invented then.  However, I&#8217;ll show how it&#8217;s done in Perl:<br \/>\n<span style=\"font-family:monospace;color:brown\"><br \/>\n#!\/usr\/bin\/perl<br \/>\n$name=&#8221;Johnny Smith! &#8221; x100;<br \/># the x100 means repeat the name 100 times<br \/>\nprint &#8220;$name&#8221;;<\/span><br \/>\nOf course, you could replace x100 with x500 or whatever.  Don&#8217;t overdo it; you just want to fill the screen, right?:)<\/p>\n<p>I might start coverage of BASIC; it&#8217;s a fun language.  If I recall correctly, I think it uses dollar signs in front of variables the way Perl does.  It&#8217;s been awhile.<\/p>\n<p>Source:  McGrath, Mike.  <em>Perl in easy steps.<\/em>  Warwickshire, UK:  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 Perl programming, you are aware of so many little tricks Perl contains for doing specific tasks. \u00a0The tutor shares a fun one. &nbsp; I recall, when I was a kid, a common trick to show off was to fill &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/perl-repeated-text\/\"> <span class=\"screen-reader-text\">Perl:  repeated text<\/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":[282,173,281],"class_list":["post-6341","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-fill-the-screen-with-your-name","tag-perl-programming","tag-repeated-text"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/6341","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=6341"}],"version-history":[{"count":11,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/6341\/revisions"}],"predecessor-version":[{"id":6352,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/6341\/revisions\/6352"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=6341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=6341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=6341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}