Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: substr outside of string?

by BrowserUk (Pope)
on Jun 16, 2013 at 16:04 UTC ( #1039222=note: print w/ replies, xml ) Need Help??


in reply to Re: substr outside of string?
in thread substr outside of string? (Updated: Fixed in later builds.)

$a x= 2**31; creates an empty string,

Look again:

C:\test>perl $a = chr(0); $a x= 2**31; print length $a; substr( $a, 0, 2**16 ) =~ tr[\0][\1]; substr( $a, 2**16, 2**16 ) =~ tr[\0][\1]; ^Z substr outside of string at - line 3. 2147483648

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^2: substr outside of string?
Download Code
Replies are listed 'Best First'.
Re^3: substr outside of string?
by ikegami (Pope) on Jun 16, 2013 at 16:08 UTC
    On systems with 32-bit IVs, one gets zero. I guess there are two problems, then.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039222]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-07-08 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls