To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 3600
    Re: Access a LEGO set DB with your phone! —Christopher L. Weeks
   (...) Well, I've discarded the first part...the explanatory text up through the big ________. Then I've read the rest of the file into an array where each item in the array is one line. So now I'm trying to split() the @array[items] by column, (...) (23 years ago, 18-Mar-02, to lugnet.off-topic.geek)
   
        Re: Access a LEGO set DB with your phone! —Dan Boger
   (...) first of all, you're running an open ended loop on the array, when you can just run through each element: foreach $set (@sets) { (...) that trailing ']' is a typo, right? I'm not running this, but I think that would be a syntax error... (...) (...) (23 years ago, 18-Mar-02, to lugnet.off-topic.geek)
   
        Re: Access a LEGO set DB with your phone! —Christopher L. Weeks
   (...) The example at (URL) suggested using : for (@lines) {do stuff} But that didn't seem to work. I'm looking at a simple tutorial on foreach, but I don't get what the $set means or does for the loop. In your example, is it doing something like (...) (23 years ago, 18-Mar-02, to lugnet.off-topic.geek)
   
        Re: Access a LEGO set DB with your phone! —Dan Boger
   (...) well, $set gets assigned each element in the array, in order. so if your array is "1", "10", "20", "this-string", $set will get each of these values, then run the code block. (...) maybe I'm misunderstanding again... @array = split /\t/, (...) (23 years ago, 18-Mar-02, to lugnet.off-topic.geek)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR