in reply to Re: need some help
in thread split a URL ?

I have to say that $a and $b should not be used! They are package global variables used by sort. Now that I have said that:

I see a problem... split returns a list not a scalar. Use one of the following types of statements instead:
@list = split(/$pattern/, $expr);
$scalar = (split(/$pattern/, $expr))[0];
($scalar) = split(/$pattern/, $expr);