[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Re: HUMOR: you have to see this code!



>>>>> "MGS" == Michael G Schwern <schwern@pobox.com> writes:
  >> 
  >> sub get_numeric_keys_greater_than_passed_value($;\%){
  >> if(!$_[1]){
  >> local ($val) = @_;
  >> local (@temp) = grep{($_ > $val)} keys (%LADY_TABLE);
  >> }
  >> else{
  >> local ($val,*TABLE) = @_;
  >> local (@temp) = grep{($_ > $val)} keys (%TABLE);
  >> }
  >> return (*temp);
  >> }

i look at that and see local(@temp) in a if/else block before the
return. so *temp should be a glob of whatever temp is in scope before
the call to this sub. the body of the sub then is a no-op. how would
*temp refer to either local(@temp) since they are out of scope by then?

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe