Skip to content

Instantly share code, notes, and snippets.

Created July 31, 2011 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1116522 to your computer and use it in GitHub Desktop.
Save anonymous/1116522 to your computer and use it in GitHub Desktop.
use v6;
class Entry {
has $.filename;
has $.text;
method generate {
my $fh = open $!filename, :w;
$fh.print($!text);
$fh.close;
}
}
my $blogpost = Entry.new(
filename => "blog.txt",
text => "today I wrote my first perl 6 program.\n",
);
$blogpost.generate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment