in reply to url and arrays

What value does $parse contain?

What is the index of the last element of @parse?

Most likely, you want $#parse and not 0+@parse, but I'd use a regular expression instead:

$url =~ m!/([^/]+)$! or die "Couldn't find last element of '$url'"; my $FileName = $1; print $FileName;