Re: Tips or Tricks to print out tab-separated data?

2013-06-21 Thread Gary Stainburn
On Friday 21 June 2013 14:04:33 John W. Krahn wrote: > print join( "\t", @array ), "\n"; Marc The reason that John's code works and yours doesn't is that with John's code the join function only includes the @array which is what I'm guessing you meant. What your code did was to tag the "\n" on

Re: Tips or Tricks to print out tab-separated data?

2013-06-21 Thread John W. Krahn
Marc Perry wrote: Hi, Hello, I routinely generate rows of tab-separated data like this; my @array = ( "boris", "natasha", "rocky", "bullwinkle"); print join "\t", @array, "\n"; However this code inserts an extra tab between bullwinkle and the newline character. So when it is important I do

Tips or Tricks to print out tab-separated data?

2013-06-21 Thread Marc Perry
Hi, I routinely generate rows of tab-separated data like this; my @array = ( "boris", "natasha", "rocky", "bullwinkle"); print join "\t", @array, "\n"; However this code inserts an extra tab between bullwinkle and the newline character. So when it is important I do this instead: print join "\t"