Pete Krawczyk

NAME - A sample script to link LiveJournal users


  # Link "ljuser1" to "ljuser2"
  ./ ljuser1 ljuser2


This sample script uses the popular weblog site LiveJournal and creates the necessary framework for Algorithm::SixDegrees to link users together into a chain.


Before running the script for the first time, please read In short, you will need to change the $agent variable; it must contain your email address.

Also, if you intend to run this more than a couple times, please implement some form of results caching. It could be as simple as a tied DBM file; just please don't abuse the resource, as other people rely on this courtesy LiveJournal extends for their own uses.

It will then try to connect the two LiveJournal users given on the command line.


A web version of this utility is at It has extra options, and will show the users as it progresses. You may not get the same result on the web version as this sample, but they should both be equivalent lengths.