![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
Senior Coder ![]() Join Date: Apr 2003
Location: in my house
Posts: 4,330
Thanks: 35
Thanked 151 Times in 147 Posts
![]() ![]() |
this loop grinds the server to a crawl - why plz
I don't understand why this snippet would grind the server to a crawl.
Having passed a number of vars from a form of checkboxes, I am trying to put them in their own hash for passing to a sub. here's the dumper data of the form data being passed Code:
$VAR1 = {
'1' => '2009-10-02�2009-10-03�2009-10-04�2009-10-05',
'2' => '2009-10-05�2009-10-06�2009-10-07�2009-10-08'
};
Code:
foreach my $room (sort %form){
if ($room =~/^\d+$/ ) { #if room is a number.
my $dates = $form{$room};
print qq( room=$room : date=$dates<br /> );
}
}
bazz
__________________
"The day you stop learning is the day you become obsolete"! - my late Dad. Useful MySQL resource Useful MySQL link |
|
|
|
|
|
PM User | #2 |
|
Senior Coder ![]() ![]() Join Date: Dec 2007
Posts: 4,658
Thanks: 374
Thanked 562 Times in 551 Posts
![]() ![]() |
Code:
foreach my $room (sort
best regards |
|
|
|
|
|
PM User | #3 |
|
Senior Coder ![]() Join Date: Apr 2003
Location: in my house
Posts: 4,330
Thanks: 35
Thanked 151 Times in 147 Posts
![]() ![]() |
Blimey, a stupid mistake which I hadn't made in an earlier snippet about an hour before.
![]() Thanks oesxyl. bazz
__________________
"The day you stop learning is the day you become obsolete"! - my late Dad. Useful MySQL resource Useful MySQL link |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|