<?xml version="1.0" encoding="windows-1252"?>
<node id="61798" title="busunsl" created="2001-03-02 13:20:05" updated="2003-12-19 11:01:56">
<type id="15">
user</type>
<author id="61798">
busunsl</author>
<data>
<field name="doctext">
Well, that's me after several weeks of non-shaving :-)&lt;p&gt;

&lt;hr&gt;
&lt;h4&gt;Authors I like&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;J. R. R. Tolkien
&lt;li&gt;Terry Pratchett
&lt;li&gt;Douglas Adams
&lt;li&gt;T. H. White
&lt;li&gt;Alan Dean Foster
&lt;/ul&gt;

&lt;hr&gt;
&lt;pre&gt;
-----BEGIN PERL GEEK CODE BLOCK-----
Version: 0.01
P+++&gt;++++(+++)$c--&gt;+P6+
R++&gt;++++M++&gt;+++O++&gt;+++MA++E++PU+BD
C++D++&gt;+++S++X+WP+++MO+PP!n-CO PO o+G
A-OLC+OLCC+OLJ--Ee---Ev+Eon-uL++uS uH
uo w-m!
------END PERL GEEK CODE BLOCK------

&lt;/pre&gt;
&lt;p&gt;
&lt;!-- location:latitude=50.56.49,longitude=6.15.5 --&gt;
&lt;!-- os:Linux,Solaris,HP-UX,AIX,OS/400 --&gt;
&lt;!-- birthday:1964/04/18 --&gt;

&lt;hr&gt;
&lt;h4&gt;Starting my own index into the Monastery here, not much by now&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;GUI Tk design tool: [id://90282|here]
&lt;li&gt;When to use OO: [id://91080]
&lt;li&gt;Coding Style: [id://91162]
&lt;li&gt;Sharing data between apache processes: [id://92078]

&lt;li&gt;Variable which is numeric and alpha: [id://92331]
&lt;li&gt;Find::File with params: [id://109068]
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4&gt;Link types at PM (because i tend to forget :-):&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[id://]&lt;/code&gt; a node id
&lt;li&gt;&lt;code&gt;[cpan://]&lt;/code&gt; searches CPAN
&lt;li&gt;&lt;code&gt;[jargon://]&lt;/code&gt; searches the Jargon file hosted at the University of Amsterdam.
&lt;li&gt;&lt;code&gt;[kobe://]&lt;/code&gt; is an alternate for the &lt;code&gt;[cpan://]&lt;/code&gt; tag
&lt;li&gt;&lt;code&gt;[perldoc://]&lt;/code&gt; searches perldoc. The idea here is to provide a way of linking to current Perl documentation.
&lt;li&gt;&lt;code&gt;[pad://]&lt;/code&gt; is a shortcut to a user's scratch pad
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4&gt;SQL snippets&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;largest grouped sum:
&lt;code&gt;
  select key, sum(val) from table
  group by key
  order by sum(val) desc

  read only the first record
&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4&gt;perl idioms&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;slurp a file:&lt;/b&gt; 
&lt;code&gt;my $contents = do { local (@ARGV, $/) = $filename; &lt;&gt; };&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;set even elements of @list to 'bla':&lt;/b&gt;
&lt;code&gt;$_ % 2 or $list[$_] = 'bla' for 0..$#list;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;getting indices sorted by value:&lt;/b&gt;
&lt;code&gt;my @indices = sort { $a[$a] &lt;=&gt; $a[$b] } 0..$#a;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;initialize hash elements:&lt;/b&gt;
&lt;code&gt;@hash{@array} = (1) x @array&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;assign empty string defaults:&lt;/b&gt;
&lt;code&gt;$_ = '' for grep ! defined ( $foo, $bar, $baz );&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;blank padding:&lt;/b&gt;&lt;code&gt;$str = pack('A40',$str);&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;</field>
<field name="lasttime">
2013-05-13 09:01:14</field>
<field name="experience">
5899</field>
<field name="user_scratchpad">
358676</field>
<field name="imgsrc">
images/userincoming/busunsl.jpeg</field>
<field name="timeformat">
</field>
<field name="numwriteups">
352</field>
<field name="location">
Germany/Ederen or D&amp;uuml;sseldorf</field>
<field name="timezone">
Europe/Rome</field>
<field name="codewrapoff">
</field>
<field name="codewraplength">
120</field>
<field name="codeautowrap">
</field>
<field name="codeprefix">
</field>
<field name="codebig">
</field>
</data>
</node>
