On Feb 28, 2014, at 9:13 PM, Bill McCormick wrote:
> Can somebody help me understand this? Given this loop, and the logged output
> following ...
>
> my $found;
> for( @$products ) {;
> $found = $$_ =~ m|$project|;
> $dump = Data::Dumper->Dump([$_, $project, $$_, $found]);
> $logger->trace(
On 2014-03-01 06:13, Bill McCormick wrote:
$found = $$_ =~ m|$project|;
Alternative:
$found = ( index( $project, $$_ ) >= 0 );
or rather use:
$found = $project =~ /\b\Q$$_\E\b/;
Always add escaping and anchors, or you will match the unmatchable.
--
Ruud
--
To unsubscribe, e-mail: be
On 3/1/2014 6:19 AM, Paul Johnson wrote:
On Fri, Feb 28, 2014 at 11:13:05PM -0600, Bill McCormick wrote:
Can somebody help me understand this? Given this loop, and the
logged output following ...
my $found;
for( @$products ) {;
$found = $$_ =~ m|$project|;
I think you might have meant:
On Fri, Feb 28, 2014 at 11:13:05PM -0600, Bill McCormick wrote:
> Can somebody help me understand this? Given this loop, and the
> logged output following ...
>
> my $found;
> for( @$products ) {;
> $found = $$_ =~ m|$project|;
I think you might have meant:
$found = $project =~ m|$$_|;
>
Can somebody help me understand this? Given this loop, and the logged
output following ...
my $found;
for( @$products ) {;
$found = $$_ =~ m|$project|;
$dump = Data::Dumper->Dump([$_, $project, $$_, $found]);
$logger->trace(qq(dump=$dump));
}
I can't explain why $found is not true on the