Re: identity tests and comparing two references

2005-04-07 Thread Thomas Sandlaß
Austin Hastings wrote: So if $$ref gives the 'all the way down' behavior, how do I get "just one layer down" dereferencing? How about: my XMLnode $x = parseXML( "file.xml" ); do_something( $x.down.down.down.item[17].up.up.body.down.down ); Details of class XMLnode and friends left as an excercise

Re: identity tests and comparing two references

2005-04-07 Thread Thomas Sandlaß
Larry Wall wrote: : Is a closure return type indicated with this siglet syntax, too? : : sub foo :(Str,Int) of :(Any) {...} You would need :() only to group multiple siglets into a single type. So an Any can stand on its own. Ohh, interessting! I wanted to express a return value type that is a su

say and print (pugs)

2005-04-07 Thread Ovid
You know, this should be simple and maybe I'm overlooking something obvious. I was trying out Pugs and my first program worked great: for 1 .. 6 -> $var { say $var; } The second version didn't: for 1 .. 6 { say; } For the life of me, I can't recall if "say" (or "print", for th

Re: say and print (pugs)

2005-04-07 Thread Luke Palmer
Ovid writes: > You know, this should be simple and maybe I'm overlooking something > obvious. I was trying out Pugs and my first program worked great: > > for 1 .. 6 -> $var { > say $var; > } > > The second version didn't: > > for 1 .. 6 { > say; > } > > For the life of me, I