updated Floyd_warshall.pl

Removed reliance of convert function on global variable