Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: vec overflow?by LanX (Saint) |
on Jun 25, 2013 at 00:48 UTC ( [id://1040500]=note: print w/replies, xml ) | Need Help?? |
OFFSET is a signed integer and most Perl compilations restrict them to a maximum of 31 bits. If you need a larger OFFSET you can switch to a 64 bit platform.¹
vec EXPR,OFFSET,BITS Treats the string in EXPR as a bit vector made up of elements of width BITS, and returns the value of the element specified by OFFSET as an unsigned integer. ... Or just split the EXPR into smaller chunks and do basic arithmetics for calculating OFFSET.
Cheers Rolf ( addicted to the Perl Programming Language)
update¹) doesn't help, according to BrowserUk
updatesee older discussions and proposed workarounds
updatethis workaround doesn't look efficient, since substr is an lvalue you can use constructs like
(well if substr allows OFFSETs that big ... can't test!)
In Section
Seekers of Perl Wisdom
|
|