Read the data with Text::CSV_XS (or Text::CSV) and then model into a Graph where you can use methods like SPT_Dijkstra, SPT_Bellman_Ford, APSP_Floyd_Warshall and their variants.
Searching CPAN might help too with various solutions to shortest-path problems.
In reply to Re: find shortest path for each query from a CSV file
by Tux
in thread find shortest path for each query from a CSV file
by zing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |