Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: split problem

by Anonymous Monk
on Nov 29, 2016 at 23:25 UTC ( [id://1176876]=note: print w/replies, xml ) Need Help??


in reply to Re: split problem
in thread split problem

You're getting the error because you're attempting to assign a value to an element past the end of the array.

There is no such error in perl, arrays don't have end, this is a bug

Replies are listed 'Best First'.
Re^3: split problem
by kcott (Archbishop) on Nov 29, 2016 at 23:58 UTC
    "There is no such error in perl, arrays don't have end ..."

    Quite correct. I have stricken what I wrote from my post.

    — Ken

Re^3: split problem
by stevieb (Canon) on Nov 29, 2016 at 23:30 UTC

    Yep:

    perl -wMstrict -E 'my @a; $a[16]=0; say @a;'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-25 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found