Perl script that performs Dijkstra's algorithm on Wikipedia pages