Skip to content

Commit

Permalink
[cookbook] pass dir to process as command line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Cochrane committed Jun 19, 2015
1 parent ae590ca commit 1fea69c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions categories/cookbook/09directories/09-05-all-files-dir.pl
Expand Up @@ -10,8 +10,11 @@
=end pod

for dir(".") -> $f {
say $f.perl;
sub MAIN(:$dir = ".") {
# print Perl's representation of each file
for dir($dir) -> $f {
say $f.perl;
}
}

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit 1fea69c

Please sign in to comment.