You can wrap this in an `eval` so that it would catch the BigInt exception when typing in queries such as `prime factors of 5234523452345234523452345243524352345`

```perl
my @factors = ();
eval { @factors = factor($_); };
```