RE: Use of uninitialized value in concatenation (.) or string

2012-03-29 Thread Kronheim, David (Contr)
timothy adigun [2teezp...@gmail.com] wrote: #!/usr/bin/perl use warnings; use strict; my @wanted = qw( dad mum children); my @children = qw(tim dan mercy); my $ref = { dad = mick, mum = eliz, children = { first = 'tim', second = 'dan', third = 'mercy', }, }; foreach

RE: how to constitute some value based on the possible abbrevation

2012-03-23 Thread Kronheim, David (Contr)
Jim wrote: Jim Gibson [jimsgib...@gmail.com] Sent: Thursday, March 22, 2012 1:39 AM To: beginners@perl.org At 12:26 PM +0800 3/22/12, lina wrote: %abbrev = ( 'CNS Neurol Disord Drug Targets' = 'CNSNDDT', 'Intermolecular Forces' = 'IF',

RE: How can I extract the lines after A

2012-03-14 Thread Kronheim, David (Contr)
lina [lina.lastn...@gmail.com] wrote: On Sun, Mar 11, 2012 at 10:45 PM, lina lina.lastn...@gmail.com wrote: A 7.803481E-01 8.228973E-01 7.515242E-012 1833 -5.50 308.3889771284 5 0 7 1.7084151661 1.6790503987 2.75458 53558 7.866901E-01

RE: How can I extract the lines after A

2012-03-14 Thread Kronheim, David (Contr)
Correcting typos: lina [lina.lastn...@gmail.com] wrote: On Sun, Mar 11, 2012 at 10:45 PM, lina lina.lastn...@gmail.com wrote: A 7.803481E-01 8.228973E-01 7.515242E-012 1833 -5.50 308.3889771284 5 0 7 1.7084151661 1.6790503987 2.75458 53558

RE: problem with nested regex matchs

2012-03-08 Thread Kronheim, David (Contr)
Chris Stinemetz [chrisstinem...@gmail.com] wrote: Hello Shanmugam, Please start a new thread when you post a new topic. On Wed, Mar 7, 2012 at 5:14 PM, shanmugam m bluepulse5...@gmail.com wrote: Hi, This is my first perl program..I'm getting wired errors.Please take a look. This line

RE: Parsing Question

2012-02-02 Thread Kronheim, David (Contr)
Hi Tim: As you indicate a line return is missing, in the original email: # print this information to the screen print $current_block_hostname:$current_state\n; # since were finished with this hoststatus

RE: Parsing Question

2012-02-01 Thread Kronheim, David (Contr)
Brandon, I took most of your comments and sample data and put it in the following program. Taking the data out of the program and parsing it from files and directories, might be a good exercise for you. Generally variables are best declared close to where they are first used. Since the scope

RE: working with large integers

2012-01-11 Thread Kronheim, David (Contr)
Hi Tim: I don't trust picking off the first or last 10 digits, without using BigInt. Without BigInt, Perl will give a sum with your code but, the digits in the answer will be different. Frequently I find using examples based on texts easier than CPAN documentation. The subroutine I got from

RE: Hello a question about .+?

2011-12-29 Thread Kronheim, David (Contr)
Actually, the ending ? makes the match non-greedy, in detail: Given: SASI_Hs01_00205058 HUMAN NM_005762 857 MISSION® siRNA 2 140.00 if (/(SASI\w+)(.+?)\s(\d+)\s/) { print $3\n; } Match starts looking for the literal SASI followed by one or more \w's, which

RE: Replace words in a file using perl script

2011-12-16 Thread Kronheim, David (Contr)
Hi Melvin, It looks like you're editing each line but not writing back to the file, add some print's or say's for $line to see what's happening. Sincerely, David Kronheim Production Support Tier II Gateway Error Correction, VZ450 EDI, EDI Billing, Metakey/LIA 484-213-1315