blob: 4229c6b780dca85cbc74156f3658e018ded1a4fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use strict;
use warnings;
use v5.16.0;
use File::Temp 'tempdir';
use File::Spec::Functions;
use Test::More tests => 1;
my @md = (1..305);
my @mp = (1000..1205);
my $path = tempdir uc cleanup => 1;
foreach (@md) {
open(my $f, ">", catfile $path, "md_$_.dat");
close $f;
}
foreach (@mp) {
open(my $f, ">", catfile $path, "mp_$_.dat");
close $f;
}
my @b = glob(qq{$path/mp_[0123456789]*.dat
$path/md_[0123456789]*.dat});
is scalar(@b), @md+@mp,
'File::Glob extends the stack when returning a long list';
|