Skip to content

Instantly share code, notes, and snippets.

@pmakholm
pmakholm / serialize.pl
Created June 15, 2009 08:11
Benchmark of serialization modules
#!/usr/bin/perl
# Originaly at:
# http://idisk.mac.com/christian.hansen/Public/perl/serialize.pl
# Updated by Peter Makholm, June 2009
# http://gist.github.com/130005
# - Added Data::Dumper and a current set of YAML/JSON modules
# - added tags for the -b option: :core, :yaml, :json
# Updated by Peter Makholm, October 2009
# - Moved main logic into Benchmark::Serialize
#!/usr/bin/perl
#
# An evil form of perl DESTROY-method
use strict;
use warnings;
{
package Evil;
our @DESTROYED;
@pmakholm
pmakholm / worktime.pl
Created May 18, 2009 13:53
Script to summarize working time based om utmp entries
#!/usr/bin/perl
=license
"THE BEER-WARE LICENSE" (Revision 42):
<[email protected]> wrote this file. As long as you retain this notice
you can do whatever you want with this stuff. If we meet some day, and
you think this stuff is worth it, you can buy me a beer in return
Peter Makholm
@pmakholm
pmakholm / udpcat.pl
Created April 15, 2009 17:00
Simple script to 'cat' an UDP port
#!/usr/bin/perl
# quick and dirty: Read from a udp socket and print to STDOUT
# usage: udpcat.pl <host> <port>
# or: udpcat.pl <host>:<port>
use strict;
use warnings;
use IO::Socket::INET;