Help for this page

Select Code to Download


  1. or download this
    my $a = 'Foo'; # $a isa Str now
    $a = 42;       # $a isa Int now
    
  2. or download this
    my @list = CustomList.new();
    @list = @other_list; # you lose @list's type as well
    ...
    # assignment that preservers the type has to
    # assign to the contents, not the container:
    @list[*] = @other_list;