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 ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-03-19 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found