That would work, except that it does "die" on a system without symlinks.
I think , however, a combination of this and the '-l' test would do the trick, wrapping the readlink function in an eval (even suggested as such in the eval POD to handle platform specific features).
Something along the lines of:
my $filename = "something";
while ( -l $filename )
{
eval { $filename = readlink $filename }
}