___ function is used for joining lists.

___ function is used for joining lists.
A. foreach
B. for
C. split
D. join
 
Answer: d
Explanation: The join function acts in an opposite manner to split. It combines its arguments into a single string and uses the delimiter as the first argument. For example,
Code:
$weekstr = join( “ “, @week_arr) ;
@weekstr = join(“ “, “mon”, “tue”, “wed”);
print $weekstr ;            // output will be mon, tue, wed
 

Tìm kiếm

Back
Top