Help for this page

Select Code to Download


  1. or download this
    C:\dev\fun\pugs>pugs -e "sub hi { \"Hello, \" ~ $_ } ; hi( \"Perl 6!\n
    +\" )"
    
  2. or download this
    *** Evl: Syn ";" {{ Syn ":=" {{ Var "&prefix:hi" (line 1, column 8); s
    +ub {...} }
    }; App "&prefix:hi" [] [Val (VStr "Perl 6!\n")] }}
    ...
    ***  Ret: "Hello, Perl 6!\n"
    *** Ret: "Hello, Perl 6!\n"
    Hello, Perl 6!
    
  3. or download this
    multi sub quicksort () { () }
    multi sub quicksort ( $x, *@xs ) {
    ...
      @xs.grep( { $_ >= $x } ).quicksort
    }
    quicksort(1,5,2,4,3)
    
  4. or download this
    C:\dev\fun\pugs>pugs ex.pl
    
    Fail: cannot cast: VError "\nunexpected \")\"\nexpecting term" (NonTer
    +m (line 1, column 27))