Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

busunsl

by busunsl (Vicar)
on Mar 02, 2001 at 18:20 UTC ( #61798=user: print w/ replies, xml ) Need Help??

Well, that's me after several weeks of non-shaving :-)


Authors I like

  • J. R. R. Tolkien
  • Terry Pratchett
  • Douglas Adams
  • T. H. White
  • Alan Dean Foster

-----BEGIN PERL GEEK CODE BLOCK-----
Version: 0.01
P+++>++++(+++)$c-->+P6+
R++>++++M++>+++O++>+++MA++E++PU+BD
C++D++>+++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------


Starting my own index into the Monastery here, not much by now


Link types at PM (because i tend to forget :-):

  • [id://] a node id
  • [cpan://] searches CPAN
  • [jargon://] searches the Jargon file hosted at the University of Amsterdam.
  • [kobe://] is an alternate for the [cpan://] tag
  • [perldoc://] searches perldoc. The idea here is to provide a way of linking to current Perl documentation.
  • [pad://] is a shortcut to a user's scratch pad

SQL snippets

  • largest grouped sum:
    select key, sum(val) from table group by key order by sum(val) desc read only the first record

perl idioms

  • slurp a file: my $contents = do { local (@ARGV, $/) = $filename; <> };
  • set even elements of @list to 'bla': $_ % 2 or $list[$_] = 'bla' for 0..$#list;
  • getting indices sorted by value: my @indices = sort { $a[$a] <=> $a[$b] } 0..$#a;
  • initialize hash elements: @hash{@array} = (1) x @array
  • assign empty string defaults: $_ = '' for grep ! defined ( $foo, $bar, $baz );
  • blank padding:$str = pack('A40',$str);

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2015-07-28 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (257 votes), past polls