The hash method on a Ruby String returns a number based on the length and content of the string:
>> "foo".hash => 876516207
What is equivalent in Perl?
If you want to get an arbitrary line digest, check out the Digest module in CPAN, which supports MD5 and SHA1 / 2. You can crop the result for any number of characters that you need.
Ruby, , String, - Perl. rb_str_hash().
Just out of curiosity, what are you going to use the hash for? The Digest module is probably good enough for most purposes, but there are some cases where you might want to roll your own. Rare, but possible.
Source: https://habr.com/ru/post/1727890/More articles:More than a selector in jquery? - jqueryA faster way to merge rectangles based on their intersection is c #В Visual Studio как я могу загрузить .png изображение из папки "Ресурсы проекта"? - c#Deprecated Symfony function - prototypehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1727889/what-are-the-advantage-of-assinging-object-fields-to-local-variables&usg=ALkJrhgK5CpFFgziyMrBfzNhhu18gS873QHow to create a Firefox extension (add-on) available only for a specific site? - firefox-addonКак создать таблицу в SQLite с помощью VS2008 Server Explorer - sqlPython: Why does this doc test fail? - pythonCommit all capitals to NSTextField (Cocoa) - capitalizationMysql query returns only the first letter of the rows - sqlAll Articles