Re: Installing Module::Build::Tiny from CPAN fails . . . because it requires Module::Build::Tiny!?! WTF?

2014-02-17 Thread Marc Perry
Hi Brian, Very nicely explained. I suppose Perl Beginners is not the best forum for this question. I clearly didn't understand the various ways to use prove. Thanks, --Marc On Sun, Feb 16, 2014 at 10:13 AM, Brian Fraser wrote: > On Sat, Feb 15, 2014 at 10:34 PM, Marc Perry wrote:

Re: Installing Module::Build::Tiny from CPAN fails . . . because it requires Module::Build::Tiny!?! WTF?

2014-02-16 Thread Marc Perry
at – but the tests still passed > and the module installed. > > (Strawberry Perl ships with Module-Build-Tiny, so in order to emulate your > situation I removed it before trying to install the module using > cpan.) > > Cheers, > Rob > > *From:* Marc Perry &

Installing Module::Build::Tiny from CPAN fails . . . because it requires Module::Build::Tiny!?! WTF?

2014-02-15 Thread Marc Perry
Has anyone else encountered this? I had to dig down deep in my testing lore and run 'prove -v t/simple.t' before I could find the STDERR that revealed this. When I reviewed the files in the Module, sure enough: use Module::Build::Tiny (which unfortunately I don't have and am trying to install).

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"

Re: Unintended behavior: Range operator inside a while loop continues to pattern match on the subsequent file

2011-04-21 Thread Marc Perry
Thanks, Paul. A very thoughtful response--I will try this out (I don't recall every encountering the ?? operator, but if it works as advertised I will likely use it a lot). --Marc On Thu, Apr 21, 2011 at 3:29 PM, Paul Johnson wrote: > On Thu, Apr 21, 2011 at 01:42:42PM -0400, Marc Per

Re: Unintended behavior: Range operator inside a while loop continues to pattern match on the subsequent file

2011-04-21 Thread Marc Perry
Beautiful; I should've known that brian d foy would have come up with a solution--I even have a copy of that book! Thanks, --Marc On Thu, Apr 21, 2011 at 3:10 PM, Brian Fraser wrote: > http://www.effectiveperlprogramming.com/blog/314 > > Brian. > > On Thu, Apr 21, 2011 at

Unintended behavior: Range operator inside a while loop continues to pattern match on the subsequent file

2011-04-21 Thread Marc Perry
Hi, I was parsing a collection of HTML files where I wanted to extract a certain block from each file, like this: > ./script.pl *.html my $accumulator; my $capture_counter; while ( <> ) { if ( //.../labelsub/ ) { $accumulator .= $_ unless /labelsub/; if ( /labelsub/ && !$cap

What is the difference between: 'my $var = 1' vs. 'my ( $var ) = 1'?

2010-04-20 Thread Marc Perry
At the introductory level it seems like I have often seen code like this: use strict; my $var = 1; And as I review other peoples' scripts I have often encountered code like this: use strict; my ( $this, $that, $the_other ); Which I interpreted as a mechanism to declare a number of scalar vari

Comparison of the comma versus the period in print statements

2009-12-22 Thread Marc Perry
Hi, I noticed that most beginner texts will introduce and use print like this: print $moose, $squirrel, $boris, "\n"; However, when I review code from CPAN, I often (typically) see: print $bullwinkle . $rocky . $natasha . "\n"; As I recall, print is a list operator (and therefore the comma syn