in reply to Re^2: create array of empty files and then match filenames
in thread create array of empty files and then match filenames
Now I need to think about "else" messages/actions. Sorry, I changed my array name halfway through the thread, I just used directly the "@numbers" example from List::Util that I found at stack overflowuse List::Util qw( min max ); my @numbers; @numbers = grep { /^\d+$/ } grep { -f } glob '*'; my $max = max@numbers; my $previous = ($max)-1; foreach (@numbers) { if (-z "$max") { if (-z "$previous") { print "previous conf: $previous \n"; print "Latest conf: $max \n"; printf "Ready for conf %d \n",++$max; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: create array of empty files and then match filenames
by poj (Abbot) on Jan 07, 2016 at 18:43 UTC |