If you ever find yourself needing to generate random graphs in Perl (quite the ice breaker, I can tell you), I recommend checking out Matt Spear’s Graph::Maker, which has generators for everything from Erdos-Renyi and Watts-Strogatz to Lollipop graphs. The only downside is the use of Graph which is s-l-o-w for graphs of even moderate size, so makes using it directly for simulations of Social Networks out.
[Image from Wikipedia]