Help for this page

Select Code to Download


  1. or download this
    scalar((1,3,5))     #evaluates to the last element of the list --- 5
    if( (5,3,0) )       #evaluates to the last element of the list --- 0, 
    +thus evaluates to false
    $val=(5,6,7);       #evaluates to the last element of the list --- 7
    
  2. or download this
    $ret = (($i, $j, $k)=(5,6,8,9));        #evaluates to the number of el
    +ements on the right side list --- 4
    if( ($k, $v) = ( 1, 0 ) )               #evaluates to the number of el
    +ements on the right side list --- 2, thus evaluates to TRUE
    while ( ($key, $value) = each %map )    #still evaluates to the number
    + of elements on the right side hash
    
  3. or download this
    my $count_foo = () = /foo/g;