Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: (FoxUni) Re(3): Breaking output lines into N-element chunks

by demerphq (Chancellor)
on Apr 15, 2002 at 09:55 UTC ( [id://159124]=note: print w/replies, xml ) Need Help??


in reply to Re(3): Breaking output lines into N-element chunks
in thread Breaking output lines into N-element chunks

at least loop from 0 to $#vars instead of mucking about with length-1

Actually I used to do this. But I have started getting out of the habit as I understand $#array has been removed from Perl6.

Do you really think its that confusing? @array is a one based number, and indexes are zero based. Seems pretty reasonable to me... And I have to say that definately _dont_ agree that its more error prone than a C-Style for loop.

:-)

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.

  • Comment on Re: (FoxUni) Re(3): Breaking output lines into N-element chunks

Replies are listed 'Best First'.
Re: Re: (FoxUni) Re(3): Breaking output lines into N-element chunks
by Juerd (Abbot) on Apr 15, 2002 at 10:05 UTC

    But I have started getting out of the habit as I understand $#array has been removed from Perl6.

    Perl 6 isn't Perl 5.x, it's a new language that happens to be a lot like Perl 5. You will have to re-code things anyway. There will be a Perl 5 to 6 converter, so $#foo will be converted to @foo.end or @foo.last (I forgot which one it was), which is probably better than (@foo.length - 1).

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-19 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found