Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: $array[ 'Infinity' ]

by educated_foo (Vicar)
on Dec 17, 2007 at 01:36 UTC ( #657355=note: print w/replies, xml ) Need Help??


in reply to Re^2: $array[ 'Infinity' ]
in thread $array[ 'Infinity' ]

That is terrifyingly weird. But the 9**9**9 is just an artifact of B::Deparse, as can be seen here. I'm not sure why it does that.

Then again, it makes a kind of twisted sense that $a[inf] means "last element of @a", and (completely by accident) $a[-inf] means "last element counting from the end."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://657355]
help
Chatterbox?
[Lady_Aleena]: 1 manditory, 2 optional.
[Discipulus]: my ($need,$opta,$optb ) = @_; .. if $opta..
[shmem]: all else leads to trouble, even if the third argument depends on the existence of the second. That may become brittle.
[Discipulus]: but if have case like subname(15,undef,3 ) maybe bettere named parameters
[Lady_Aleena]: I don't want to have to do: alpha_menu($hash, undef, $type);
[Lady_Aleena]: Or what Discipulus said.
[shmem]: Lady_Aleena: geany supports ctags.
[Discipulus]: a good compromise can be my ($need, $opts_ref) = @_ a scalar and an hash reference
[Discipulus]: see you monks!
[Lady_Aleena]: shmem, let me get this sub rewritten, then I will look into how to use ctags in geany. Deal? 8)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-04-27 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (506 votes). Check out past polls.