![](/static/66c60d9f/assets/icons/icon-96x96.png)
![](https://lemmy.ml/pictrs/image/h1ChnLuBHr.png)
A physical token only authenticates itself as “something you have” if there’s no way to extract the key from it. In practice non-hardcore deployments usually have a backup procedure but in principle, if you want multiple tokens, they should have separate keys. What you’re asking in simplest form involves storing the key on a server where it can potentially spill in a server breach or the like. If the key protects something very valuable, that can be dangerous. If it’s for your old Reddit account, you might decide to do it anyway.
I won’t say “better” but Perl 6 is … interesting. It’s not clear what version you’re using.
I suggest Haskell as your next language instead of Perl, since it will change how you think. https://learnyouahaskell.com is a good place to start.