|Think about Loose Coupling|
one important point is missing so far.
Most answers more or less assume implicitely that
As general as you stated the question none of these assumption needs to be fulfilled. For example a random walk with drift can produce extremely large values very fast. Or if the underlying data generating process has a distribution without a finite variance (f.e. Cauchy-Distribution) then the usual signal extraction mechanisms fail. The most prominent examples are stock returns which possibly have no finite variance.
To make my complaints operational, you first need some good reason to assume that your data has some particular parametric distribution. Think about it. Then one can try to estimate the parameters and can identify the most unprobable values as "islands".
Another way would try to do this nonparametrically. Usually one needs much more data for these techniques.
Check: Rand the related R-modules on CPAN
Without some idea about the nature of the data generating process there are to much whens and ifs to consider to give some usable perl code for your question.