When to define an external dependent in perl module?

2012-12-28 Thread chenlin rao
I found . But it can't auto install the `require_external` system packages now. Another way I thought is pack my perl scripts as rpm and define the require perl modules as rpm dependment. But not all CPAN module has rpm in yum.repo

Re: When to define an external dependent in perl module?

2012-12-28 Thread Shlomi Fish
Hi Chenlin, On Fri, 28 Dec 2012 20:13:48 +0800 chenlin rao wrote: > I found > . But it can't auto install the `require_external` system packages now. > Another way I thought is pack my perl scripts as rpm and define the require

Pattern matching to hash

2012-12-28 Thread twlewis
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 want, but it does not work. Both "if" statemen

Re: Pattern matching to hash

2012-12-28 Thread timothy adigun
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

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
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

Re: Pattern matching to hash

2012-12-28 Thread timothy adigun
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

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
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

RE: Pattern matching to hash

2012-12-28 Thread Tim Lewis
Thank you Tim. The lack of strict and warnings should have been the first thing that I put in the code. Thank you for the correction and for the help in the loop. From: timothy adigun [mailto:2teezp...@gmail.com] Sent: Friday, December 28, 2012 4:11 PM To: twle...@reagan.com Cc: beginners@pe

RE: Pattern matching to hash

2012-12-28 Thread Tim Lewis
Thank you Chris. Using strict and warnings should have been the first thing that I did. Thank you also for the code correction. -Original Message- From: Chris Charley [mailto:char...@pulsenet.com] Sent: Friday, December 28, 2012 5:52 PM To: beginners@perl.org Subject: Re: Pattern match

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
"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