in reply to Useless use of substr in void context
Try assigning the result of the substr operation to a variable, e.g.:
my $sub = substr($links, 0, 1); [download]
William