Nikola, et al -- ...and then Nikola Janceski said... % % ...
Fixed to .. per your followup, but I still don't get it. % % % is the operator. % % for ( 1 .. 1000 ){ % print "$_\n"; % } I just don't see how this would help him. What this will do is spit out a bunch of numbers, right? What he wants is to parse an array of numbers, picking out each start point and end point for separate intervals and then note something that I don't yet know (an every-Nth-frame frequency specifier, perhaps?). Rasoul, I remember mucking about with this sort of thing in my classes long ago. You're probably going to have to build a little parser that can understand your notion of ranges. Something like loop over the input array { grab the first item is it a range with a freq specifier? (x-y:z) is it a range? (x-y) is it a simple number? (x) now you have a beginning (x) now you have an end candidate (x) if it's a range, now you have an end (y?) if not, move over one if this is a range then throw it back if this is one more than $end now you have a new end candidate loop until it isn't one more than $end throw it back now you have an end recall your freq specifier or use the default store the triple (beg, end, freq) in an array element } spit out the array of triples, one element per line sounds like a starting point for your algorithm. Looking into lex and yacc might help. Good luck :-) HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25654/pgp00000.pgp
Description: PGP signature