Close($file) required in Perl 6, unlike Perl 5

2011-07-16 Thread Parrot Raiser
The following program:

my $skeleton = "bones\n";
my $new_file = "grave";
my $handle   = open($new_file, :w);
$handle.print($skeleton);

opens the "grave" file, but leaves it empty. A last line:

close($handle);# "close()" generates an error message.

is required to get any contents in the file, unlike the equivalent Perl 5 code:

my $skeleton = "bones\n";
my $new_file = "grave";
open(my $handle, ">", $new_file) or die "$!";
print $handle $skeleton;

This might be a perfectly reasonable design decision, but I haven't
noticed it mentioned.


Bug?

2011-07-16 Thread Parrot Raiser
When a subroutine is invoked with an empty parameter list, as follows:

run_stuff();

sub run_stuff {
my ($parm) = @_;
say "Parameter is $parm";
}

@_[0] contains "Any()".

Should it?