I'm writing a little module that implements the $() and @() stuff we've been
talking about (using a source filter), and I just want to make sure I have
it right. This is the SYNOPSIS from my docs; let me know if the behavior
I'm describing is wrong.
sub Foo { '1' }
sub Bar { 1..5 }
sub Baz { @_ }
sub Context { wantarray ? 'list' : 'scalar' }
print "Foo: $(Foo)\n"; #prints Foo: 1
print "Bar: @(Bar)\n"; #prints Bar: 1 2 3 4 5
print "Baz: $(Baz('a', 'b'))"; #prints Baz: b
print "Baz: @(Baz('a', 'b'))"; #prints Baz: a b
print "$(Context)"; #prints scalar
print "@(Context)"; #prints list
Does that check out right?
Thanks,
--Brent Dax
[EMAIL PROTECTED]