Help for this page

Select Code to Download


  1. or download this
    my @stuff=getSomeList();
    for my $thing (sort @stuff) {
        say "$thing"; # quoted to force stringifcation
    }
    
  2. or download this
    say "$_" for sort getSomeList(); # quoted to force stringifcation
    
  3. or download this
    SomeGlobal::StdLib::Class->getFactoryInstance()->getSomeList()->sort()
    +->forEach(SomeOtherGlobal::StdLib::Class->getInstance()->createStdout
    +WriterFunction());
    
  4. or download this
    // Copied from Wikipedia
    var results =  from c in SomeCollection
    ...
    {
            Console.WriteLine(result);
    }
    
  5. or download this
    // Copied from Wikipedia
    var results =
    ...
            .Select(c => new {c.SomeProperty, c.OtherProperty});
    
    results.ForEach(x => {Console.WriteLine(x.ToString());})
    
  6. or download this
    my @results=map { 
        [ $_->{'SomeProperty'}, $_->{'OtherProperty'} ] 
    ...
       $_->{'SomeProperty'} < 10 
    } @SomeCollection;
    say join(' ',@$_) for @results;