RosettaCodeData/Task/Get-system-command-output/Perl/get-system-command-output-3.pl

8 lines
186 B
Raku

use autodie;
my $enc = ':encoding(UTF-8)';
my $child_pid = open(my $pipe, "-|$enc", 'ls');
while (<$pipe>) {
# Print all files whose names are all lowercase
print if m/[^A-Z]+/;
}