in reply to Get the order of HTTP request headers
> # %ENV is in random order
You do realize that hashes do not keep their order, right? They are designed for random access. If you want data back in the original order, use an array.
my @header = map { [lc($_) , $q->http($_)] } $q->http; print "$_[0] => $_[1]\n" for @header";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Get the order of HTTP request headers
by Anonymous Monk on May 05, 2010 at 11:29 UTC | |
Re^2: Get the order of HTTP request headers
by arc_of_descent (Hermit) on May 05, 2010 at 11:32 UTC |
In Section
Seekers of Perl Wisdom