On 1/12/06, Ronald J Kimball <[EMAIL PROTECTED]> wrote:

> The tip from this meeting:
> Avoid using ampersand on subroutine calls.  In particular, &mysub
> (ampersand but no parentheses) passes the current @_ to mysub(), which can
> be problematic if you're not expecting it.

Perl Best Practices also mentions an edge case where the ampersand is
treated as a bitwise-OR operator:

=begin perlbp page=176

On the other hand, the ampersand itself is visually ambiguous; it can
also signify a
bitwise AND operator, depending on context. And context can be extremely subtle:

    $curr_pos = tell &get_mask( );  # means: tell(get_mask( ))
    $curr_time = time &get_mask( ); # means: time() & get_mask( )

=end perlbp

--
Ian Langworth
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to