Query If Border Edge?

Hey all,

I'm trying to check if my edge selection is on the border of my poly object with mel, but I'm at a loss.

Does anyone have any ideas?

CODE
global proc int isBorderEdge(string $edge)
{
    int $n = size(ls("-fl",(polyListComponentConversion("-tf",$edge))));
    return (!($n - 1));
}

means : convert $edge to -faces, get a one by one list from that, get the count and put it in $n
the face count on one edge can only be 2 or 1. 2 means: no border, 1 border! so !($n - 1) is 0 for no border and 1 for border.

awesome. Thanks ewerybody!