Leser: 39
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env perl6 my $directory = '/data'; my $dh = $directory.opendir orelse die $!; for $dh.readdir { .say; } $dh.closedir;
QuoteMethod 'opendir' not found for invocant of class 'Str'
my $dh = opendir($directory) orelse die "Could not open directory '$directory': $!";
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env perl6 my $directory = '/data'; my $dh = opendir( $directory ) err die $!; for $dh.readdir { .say; } $dh.closedir;
QuoteStatement not terminated properly at line 6, near "err die $!"
in Main (src/gen_setting.pm:0)
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env perl6 my $directory = '/data'; my $dh = opendir( $directory ) orelse die $!; for $dh.readdir { .say; } $dh.closedir;
QuoteCould not find non-existent sub opendir
make t/spec/S16-filehandles/dir.t
use v6;