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

2013-06-24 Thread Brandon McCaig
On Fri, Jun 21, 2013 at 02:15:39PM +0100, Gary Stainburn wrote: What your code did was to tag the \n onto the end of the array then pass the whole thing to join. Gary is basically correct, but he worded it wrongly. When Perl calls subroutines it basically flattens arguments into a list.

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

2013-06-24 Thread John W. Krahn
Brandon McCaig wrote: On Fri, Jun 21, 2013 at 02:15:39PM +0100, Gary Stainburn wrote: What your code did was to tag the \n onto the end of the array then pass the whole thing to join. Gary is basically correct, but he worded it wrongly. When Perl calls subroutines it basically flattens

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, @array;

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 this

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 onto the

Tips and Tricks?

2009-10-04 Thread Slick
I am new at this perl thing. I just want to know tips and simple scripting. I also use strawberry perl for my program. Thanks Jason H. Owens

Re: Tips and Tricks?

2009-10-04 Thread rodrick brown
The builtun module Data::Dumper is very essential when working with data complez structures. Use strict is very useful for catching programming and user errors Sent from my iPhone 3GS. On Oct 4, 2009, at 2:02 PM, Slick jho251...@yahoo.com wrote: I am new at this perl thing. I just want to

Re: Tips and Tricks?

2009-10-04 Thread Shawn H Corey
Slick wrote: I am new at this perl thing. I just want to know tips and simple scripting. I also use strawberry perl for my program. 1. Create a folder for trying Perl: md C:\TRY (In Linux: mkdir ~/try ) 2. Create a file in your try folder called template.pl and load the following in it.

Re: Tips and Tricks?

2009-10-04 Thread Shlomi Fish
Hi Slick! On Sunday 04 Oct 2009 20:02:36 Slick wrote: I am new at this perl thing. I just want to know tips and simple scripting. I also use strawberry perl for my program. Strawberry Perl is a very fine choice for Perl on Windows - probably better than ActivePerl by now. For a

Re: Tips and Tricks?

2009-10-04 Thread Shawn H Corey
Shlomi Fish wrote: For a comprehensive site with many links to beginner-friendly Perl resources see: http://perl-begin.org/ Another on-line resource: http://perldoc.perl.org/ perldoc is an executable that comes with Perl and displays Perl dicumentation. In a command prompt, type: perldoc

Re: Tips and Tricks?

2009-10-04 Thread Robert H
On 10/4/09 2:51 PM, Shlomi Fish wrote: Hi Slick! On Sunday 04 Oct 2009 20:02:36 Slick wrote: I am new at this perl thing. I just want to know tips and simple scripting. I also use strawberry perl for my program. Strawberry Perl is a very fine choice for Perl on Windows - probably better

Re: Tips and Tricks?

2009-10-04 Thread Shawn H Corey
Slick wrote: I tried that, and the programs I am using worked before I put my code where the code needed to be, but it did not run. However if did the code without that template it worked. Jason H. Owens I'm sorry. My mother tongue is English. I do not understand what you are saying.