Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    my @movement = (0,1);
    ...
        elsif (@movement == (0, -1)) {$from = "south"}
    #    elsif (@movement == (-1, 0)) {$from = "west"}
        print "\$from = <$from>\n";
    
  2. or download this
    my @movement = (0,1);
        my $from = "";
    ...
        elsif (@movement == (0, -1)) {$from = "south"}
    #    elsif (@movement == (-1, 0)) {$from = "west"}
        print "\$from = <$from>\n";
    
  3. or download this
    Useless use of a constant in void context at ./t.pl line 4.
    Useless use of a constant in void context at ./t.pl line 4.
    $from = <north>
    
  4. or download this
    #!/usr/bin/perl -w
    my @movement = (0,1);
    ...
        elsif (@movement == (0, -1)) {$from = "south"}
    #    elsif (@movement == (-1, 0)) {$from = "west"}
        print "\$from = <$from>\n";
    
  5. or download this
    $from = <north>
    
  6. or download this
    #!/usr/bin/perl -w
    my @movement = (0,1);
    ...
        if (@movement == (1, 0)) {$from = "east"}
        if (@movement == (-1, 0)) {$from = "west"}
        print "\$from = <$from>\n";
    
  7. or download this
    Useless use of a constant in void context at ./t.pl line 5.
    $from = <>
    
  8. or download this
    #!/usr/bin/perl -w
    my @movement = (0,1);
    ...
        if (@movement == (0,1)) {$from = "east"}
        print "\$from = <$from>\n";
    
  9. or download this
    $from = <>