in reply to Re: Date Array Convolution
in thread Date Array Convolution
I don't really understand though what you did for the day overlap piece. Do you mind adding comments or explaining the chunks? I'm still kinda new to perl :/@combined = sort {$a->[0] <=> $b->[0]} (@listone,@listtwo); for ($i=0; $i<scalar(@combined); $i++) { if (substr($combined[$i][0],0,2) != substr($combined[$i][1],0,2)) + { splice(@combined,$i+1,0,[substr($combined[$i][1],0,2)."0000" +,$combined[$i][1],$combined[$i][2]]); $combined[$i][1] = substr($combined[$i][0],0,2)."2359"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Date Array Convolution
by choroba (Cardinal) on Nov 03, 2011 at 22:38 UTC | |
by alanonymous (Sexton) on Nov 03, 2011 at 23:41 UTC |