<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Perl on Miek Gieben</title>
    <link>https://miek.nl/tags/perl/</link>
    <description>Recent content in Perl on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Tue, 05 Feb 2013 14:17:00 +0000</lastBuildDate>
    <atom:link href="https://miek.nl/tags/perl/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>New Dutch Teletext Script</title>
      <link>https://miek.nl/2013/february/05/new-dutch-teletext-script/</link>
      <pubDate>Tue, 05 Feb 2013 14:17:00 +0000</pubDate>
      <guid>https://miek.nl/2013/february/05/new-dutch-teletext-script/</guid>
      <description>&lt;p&gt;Last week, the Dutch public broadcaster (&lt;a href=&#34;http://www.nos.nl&#34;&gt;NOS&lt;/a&gt;) decided to&#xA;&amp;ldquo;fix&amp;rdquo; their online teletext offering, there breaking [an old script I had laying&#xA;around](/2008/july/15/teletext_nl_script/index.htm&#xA;l). Their new web interface (displaying gifs) can be found &lt;a href=&#34;http://nos.nl/teletekst/#100_01&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;After &lt;a href=&#34;https://twitter.com/bdekruijff&#34;&gt;@bdekruijff&lt;/a&gt;&#xA;discovered their newly, hidden text feed, I decided to&#xA;adapt the old script to this new situation. Thanks to&#xA;&lt;a href=&#34;http://utopia.knoware.nl/users/eprebel/Communication/Prestel/index.html&#34;&gt;this page&lt;/a&gt; I&#xA;was able to (partially) reconstruct the feed. Most escape sequences are working, I&amp;rsquo;m&#xA;still fiddling with finding Unicode chars for the &amp;ldquo;Contiguous Graphics Set&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>String multiplication in zsh</title>
      <link>https://miek.nl/2009/august/10/string-multiplication-in-zsh/</link>
      <pubDate>Mon, 10 Aug 2009 19:46:00 +0000</pubDate>
      <guid>https://miek.nl/2009/august/10/string-multiplication-in-zsh/</guid>
      <description>&lt;p&gt;In Perl you have this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% perl -e &#39;print &amp;quot;a&amp;quot; x 5, &amp;quot;\n&amp;quot;&#39;&#xA;aaaaa&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;With that you can easily create a separator string&#xA;consisting out of 60 spaces.&lt;/p&gt;&#xA;&lt;p&gt;I always missed this in my shell - until now.&lt;/p&gt;&#xA;&lt;p&gt;In Zsh have the following expansion:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;l:expr::string1::string2:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Pad the resulting words on the left. Each word will be truncated if&#xA;required and placed in a field expr characters wide. &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;http://zsh.dotsrc.org/Doc/Release/Expansion.html&#34;&gt;zsh.dotsrc.org&lt;/a&gt;.&#xA;There is also a &lt;code&gt;r:&lt;/code&gt; variant which operates in the same way.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A library at home</title>
      <link>https://miek.nl/2009/july/17/a-library-at-home/</link>
      <pubDate>Fri, 17 Jul 2009 20:20:00 +0000</pubDate>
      <guid>https://miek.nl/2009/july/17/a-library-at-home/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve told a few&#xA;&lt;a href=&#34;https://miek.nl/s/61ba93ac0b/&#34;&gt;times about how&lt;/a&gt;&#xA;&lt;a href=&#34;s/b3021c7414/&#34;&gt;to build a library&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But there a some extra things that must be done before you can call&#xA;yourself a complete librarian.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;ID-ing the books you have&lt;/li&gt;&#xA;&lt;li&gt;Storing the information&lt;/li&gt;&#xA;&lt;li&gt;Marking the books&lt;/li&gt;&#xA;&lt;li&gt;Sorting and shelving the books&lt;/li&gt;&#xA;&lt;li&gt;Remembering who borrowed what&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h1 id=&#34;id-ing-books&#34;&gt;ID-ing books&lt;/h1&gt;&#xA;&lt;p&gt;For this I bought a barcode reader that reads the ISBN number&#xA;of the book&amp;rsquo;s backcover. With &lt;code&gt;book_get&lt;/code&gt;&#xA;(&lt;a href=&#34;https://miek.nl/downloads/2009/book_get&#34;&gt;Perl code&lt;/a&gt;)&#xA;I can retrieve the author, title, genre and year published from Google.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
