Why not match?

2012-05-19 Thread Xi Chen
Hello guys, I have a simple code, but it doesn't work and don't know why. Please see it below: Input file: 1.txt which including number and letter "o" in one line. 10o10o10 Wanted output file: 2.txt in which 10 represent 10 dots and o is replaced by letter "x".

Re: What does "=<" means?

2011-12-30 Thread Xi Chen
Yes, I agree the code looks strange. Do you have any idea to do this with a clear code? I mean to find two same letters, "p" in @a? Xi On Thu, Dec 29, 2011 at 10:17 PM, John W. Krahn wrote: > Xi Chen wrote: >> >> Hello everyone, >> >> I saw a code be

What does "=<" means?

2011-12-29 Thread Xi Chen
Hello everyone, I saw a code below to get two same letters "p" in @a. @a = qw (D D p O H p A O); foreach $b (@a){ $n =~ /$b/i; if($n >= 2){ $m = $b; } } But I don't know what does ">=" mean. Thank you! Xi -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional command

Re: Hello a question about ".+?"

2011-12-29 Thread Xi Chen
duction Support Tier II > Gateway Error Correction, VZ450 EDI, EDI Billing, & Metakey/LIA > 484-213-1315 > ________ > From: Chris Stinemetz [chrisstinem...@gmail.com] > Sent: Thursday, December 29, 2011 2:45 PM > To: Xi Chen > Cc: beginners@per

Hello a question about ".+?"

2011-12-29 Thread Xi Chen
Hello everyone, I have a question about how to translate the meaning of ".+?". Please see the examples below: SASI_Hs01_00205058 HUMAN NM_005762 857 MISSION® siRNA 2 140.00 I want to get number"857", I found the command below works: perl -ne 'if (/(SASI\w+