This seems to be a perl problem ... here on a Leap 42.1 I see werner/texlive> latexpand Use of my $_ is experimental at /usr/bin/latexpand line 136. and with newer perl versions the { and } has to be escaped AFAIK