How can I print list elements separated by line feeds in Perl? -


What is the easiest way to print all the list elements in line with Pearl feeds?

  "$ _ \ n" @list for print;  

In Perl 5.10:

  @ Ask for a list;  

Another way:

  include print ("\ n", @list), "\ n";  

or (5.10):

  join "\ n", @list;  

or about it:

  print map {"$ _ \ n"} @ list;  

Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -