with <eli$21110...@qaz.wtf> Eli the Bearded wrote:
> In comp.lang.perl.misc, gamo <
ga...@telecable.es> wrote:
>> my $b1 = join(",", 1..1000);
>> my $b2 = join(",", "a".."z");
>>
>> my @B = glob "{$b1}={$b2}";
>> my @C;
>> for (@B){
>> @C = split /=/;
>> say "@C";
>> }
> ...
>> This does not works as I expected because if I change 1000 by 10000
>> nothing is printed. Somewhere I reach an unexpected limit.
>
> Um, don't do that? The glob function is specifically for filenames and
> using it in other ways I suspect is not well supported. I'm going to
> guess your "unexpected limit" is the ARG_MAX value in limits.h.
I disagree. Clearly, there are limits (check this, hilarious:)
perl -wE '
$aa=join",",1..1030;
$ab=join",","a".."z";
say glob "{$aa}={$ab}"'
but those limits are of "csh implementation in Perl". Unfortunately,
those are behind XS (IOW, too much trouble to look for, at the moment,
may be in a couple of months).
> perldoc -f glob says "see File::Glob" and perldoc File::Glob talks
> about the various limits.
Those are flags, except "GLOB_LIMIT". Aging zsh 4.3.17 just happily
expanded "{1..10000}={a-z}" (needs tweaking though) and happily passed it
to "command echo".
> For your use case, that's fairly simple function to implement in pure
> perl.
Totaly agree. Somehow I don't see it happening (I might be
over-pessimistic though).
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom