in reply to Re^2: Cleaner code to build hierarchical display of page names
in thread Cleaner code to build hierarchical display of page names
Binary ``x'' is the repetition operator. In scalar context or if the left operand is not enclosed in parentheses, it returns a string consisting of the left operand repeated the number of times specified by the right operand. In list context, if the left operand is enclosed in parentheses, it repeats the list.Update: Fixed formatting# print row of dashes print '-' x 80; #tab over print "\t" x ($tab/8), ' ' x ($tab%8); # a list of 80 1's @ones = (1) x 80; # set all elements to 5 @ones = (5) x @ones;
|
|---|