Do web browsers have a unique ID that can be passed on to Perl scripts? (Like a unique serial - like products that you buy in the shop have for example)
For instanc
You can store some unique values (e.g.: user id) in the user browser using "Html Local Storage" permanently with no expiration date, and store the same values with info about the user agent in the db.
Then you pass the user agent info with the data in the local storage and match it with the ones in the database...
// store
localStorage.setItem("myValue", "123-abcd");
// retrieve
var myValue = localStorage.getItem("myValue");
I'm not sure how much secure is this approach to identify users, but the Html Local Storage supposed to be accessible for only pages from one origin (same domain and protocol).
There is also "HTML Session Storage" to store data in the users browser for only one session.