Aaron Sherman wrote:
> sub chomp($string is rw){
> my $irs = ${"/"}; # XXX What is $/ now?
> if defined $irs {
> if $irs.isa(Object) {
> return undef;
> } elsif $irs.length == 0 {
> $string =~ s/ \n+ $ //;
Should that C<+> be there? I would expect chomp only to remove a single
line-break.
> sub reverse(@list) {
> my @r;
> my $last = @list.length - 1;
> for(my $i=$last;$i >= 0;$i++) {
> @r[$last-$i] = @list[$i];
> }
> return *@r;
> }
In a scalar context does C<reverse> still a string with characters
reversed?
Smylers