Skip to content

skaji/perl6-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

NAME

File - open files with block like Ruby

SYNOPSIS

use File;

File.open: "foo.txt", :w, -> $fh {
  $fh.say("hello, world.");
}; # automatically close $fh

DESCRIPTION

File provides open method, which executes the block arguement with the filehandle and close it automatically.

In Perl5, filehandles are closed at the end of a scope, but in Perl6, they are not closed, and you are responsible for that.

COPYRIGHT AND LICENSE

Copyright 2015 Shoichi Kaji skaji@cpan.org

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%