Greetings monks,
I am currently working on a project where i query an API, which then gives me back various informations about objects in an xml sheet. These informations i then store in a mysql database for caching and further processing.
My problem comes with one attribute of said objects that codifies various related attributes into a single bitmask. Due to the way the API works, this bitmask is presented as a decimal integer in string form. An example would be this:
576458570460036993
(This is roughly as big as it gets.)
Since the mysql database does not seem to be capable of storing integers of that size (Even when the column is set to integer of size 100.), i was forced to store the numbers as raw text. However, to make a long story short, i cannot seem to find a way to extract that string from the database in a way that allows me to tell perl to treat it as a number, so i can perform binary operations on it to check against the various attributes stored in the bitmask.
Am i doing something horribly wrong, overlooking something, or is there simply no easy way to make this possible?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.