use List::Util qw(max); my($self, $id) = @_; my $dir = $self->{update_dir}; opendir(my $dir_h, $dir ) or return; #Change this if you expect a possible valid id of "0" my $id = max( grep { /^\d+$/ && $_ <= $id } readdir $dir_h ) or return; return "$dir/$id";
In reply to Re: How do I un-map this code?
by runrig
in thread How do I un-map this code?
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |