sub _file_containing { my($self, $id) = @_; opendir(my $dir, $self->{update_dir}) or return; my @files = sort { $a <=> $b } grep { /^\d+$/ && $_ <= $id } readd +ir $dir; return undef if !@files; return "$self->{update_dir}/$files[-1]"; }
... I don't know that it's particularly more legible, though.
Oh -- and the '_' prefix tends to be used in OO code to mark private methods.
In reply to Re: How do I un-map this code?
by jhourcle
in thread How do I un-map this code?
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |