Re: looping over an array of hashes




DJ Stunks wrote:
25 for my $location ( @$locations ) {
26 $location->{location_status} = 1
27 if $x{ $location->{location_id} };
28 }

I would actually change this to the following because I feel it's
tidier/quicker to check for truth rather than existence.

for my $location ( @$locations ) {
$location->{location_status}
= $x{ $location->{location_id} } ? 1 : 0;
}

-jp

.



Relevant Pages

  • Re: path-dependence: a philosophical issue concerning time
    ... feeling today is that change is essential to all being, and persistence ... is due to special and temporary circumstances that need explanation, ... stability or is it putting the question to objective existence? ... truth nor that what is "currently thought" is correct. ...
    (sci.physics)
  • Re: Scientific method to reject "proof" of Allah being not almighty
    ... The Truth Is ... The ultimate issue at hand, a Purposive and Guided Existence, is *far* ... What is the context of this creation? ...
    (soc.religion.islam)
  • Re: Exception to the rule? (Tarski´s T-scheme)
    ... this sentence is then a truth of the ... > each language in the hierarchy is properly stronger than any earlier one (in ... facts as entities, then it is impossible for there to be absolutely ... very different color from that of the existence of things. ...
    (sci.logic)
  • Re: The Creation Order
    ... It is obviously the source of my consciousness that is eternal. ... That does not say you had any existence prior to your birth/conception ... I really must call your reading of Eph 1:4-6 into question. ... I encourage you to keep reading, and determine for yourself the truth ...
    (talk.origins)
  • Re: OT. : Climate change
    ... without study my suggestion that spiritual truth also exists. ... perceive the existence of a Creator does not determine His existence? ... "god" than I. ... "Science has proof without any certainty. ...
    (rec.outdoors.rv-travel)