Hi,
> my $prefix_search_list = '03S,04S';
> my @prefix_array = split /\,/,$prefix_search_list;
> my %prefix_hash = map {$_ => 1 } @prefix_array;
>
> #compare 05S to 03S and 04S
> my $input_field = "05S885858"; #should not match
>
1. using stricts and warnings pragma, shows clearly that there i
Tim wrote in message news:1356726727.215915...@webmail.reagan.com...
I hope this is a simple fix. I want to check the beginning characters of
items in a hash, and compare that to a scalar variable.
I do not need for the entire value to match; just the first couple of
characters.
Tim
my $p
Hello Chris,
Please see my comment below.
On Fri, Dec 28, 2012 at 10:24 PM, Chris Charley wrote:
>
>
> Tim wrote in message news:1356726727.215915216@**webmail.reagan.com...
>
> I hope this is a simple fix. I want to check the beginning characters of
>> items in a hash, and compare that to a s
Chris Charley"" wrote in message news
Tim wrote in message news:1356726727.215915...@webmail.reagan.com...
I hope this is a simple fix. I want to check the beginning characters of
items in a hash, and compare that to a scalar variable.
I do not need for the entire value to match; just the
@perl.org
Subject: Re: Pattern matching to hash
Hi,
my $prefix_search_list = '03S,04S';
my @prefix_array = split /\,/,$prefix_search_list;
my %prefix_hash = map {$_ => 1 } @prefix_array;
#compare 05S to 03S and 04S
my $input_field = "05S885858"; #should not match
matching to hash
Chris Charley"" wrote in message news
>Tim wrote in message news:1356726727.215915...@webmail.reagan.com...
>>I hope this is a simple fix. I want to check the beginning characters
>>of items in a hash, and compare that to a scalar variable.
>>I do n
"timothy adigun" wrote in message
news:CAEWzkh6mZohVJn__LRL60AGoqbHkmTPyn=JM=cewcmmftpj...@mail.gmail.com...
Hello Chris,
Please see my comment below.
On Fri, Dec 28, 2012 at 10:24 PM, Chris Charley
wrote:
[snip]
I only answered the question using a for loop. Am not the one who
origi
On 2012-12-28 21:32, twle...@reagan.com wrote:
I hope this is a simple fix. I want to check the beginning characters of items in a
hash, and compare that to a scalar variable. I do not need for the entire value to
match; just the first couple of characters. Here is a simple example of what I