in reply to Re: Question Marks in Subroutine Names
in thread Question Marks in Subroutine Names

${'polly wanna cracker?'} = sub {'no'}; warn &${'polly wanna cracker?'}; warn ${'polly wanna cracker?'}->(); my %F = ( 'polly wanna cracker?' => sub {'no'}, ,); warn &{$F{'polly wanna cracker?'}}; die $F{'polly wanna cracker?'}->();
I wonder what people will wish for next, // in function names?

(I don't think either one will/should happen)

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Replies are listed 'Best First'.
Re: (crazyinsomniac: bah) Re^2: Question Marks in Subroutine Names
by rob_au (Abbot) on May 08, 2002 at 13:11 UTC
    ++crazyinsomniac ... I would probably go just one step further and use type-globbing to simplify the subsequent function call - For example ...

    *{'is_contact_female?'} = sub { my @args = @_; ... }; &{'is_contact_female?'}( @args );

    I first encountered this manner of subroutine assignment in Damian Conway's selfGOL obfuscation, a "must-read" for any aspiring obfuscator.