Re: Using the ternary operator to concat a string not working like I think?

2012-04-04 Thread Uri Guttman
On 04/03/2012 06:55 PM, timothy adigun wrote: Hi Stan, Please check my comments below: On Tue, Apr 3, 2012 at 10:39 PM, Stan N/Astan...@gmail.com wrote: I've run into a weird issue where the ternary operator isn't doing what I believe it normally would and need some help understanding the

Re: Using the ternary operator to concat a string not working like I think?

2012-04-04 Thread Paul Johnson
On Tue, Apr 03, 2012 at 05:39:10PM -0400, Stan N/A wrote: I've run into a weird issue where the ternary operator isn't doing what I believe it normally would and need some help understanding the issue. I'm sure I'm missing some critical point, but perhaps this is an issue with perl. Here's a

Re: Using the ternary operator to concat a string not working like I think?

2012-04-04 Thread Shlomi Fish
Hi all, inspired by this thread, I’ve added this item in my “Perl Elements to Avoid” page: http://perl-begin.org/tutorials/bad-elements/#ternary_operator_instead_of_if_else I added it directly below the item about using map instead of foreach for side-effects, which exhibits a similar

split

2012-04-04 Thread Anamika K
Hello All, I have a file like this: NM_009648,NM_001042541:10.955794504181601 NM_019584:1 0.900900900900901 NM_198862:1 0.835755813953488 NM_001039093,NM_001039092,NM_153080:1 0.805008944543828 and want output like this: NM_009648 0.955794504181601 NM_001042541:1

Re: split

2012-04-04 Thread timothy adigun
Hi Anamika, Please, check my comments and suggestion below: On Wed, Apr 4, 2012 at 1:57 PM, Anamika K anamika...@gmail.com wrote: Hello All, I have a file like this: NM_009648,NM_001042541:10.955794504181601 NM_019584:1 0.900900900900901 NM_198862:1 0.835755813953488

Re: split

2012-04-04 Thread Shawn H Corey
On 12-04-04 08:57 AM, Anamika K wrote: Could you please suggest my how to proceed? You should use two splits: one to separate the data by white space into two; and another to separate the first datum by commas. -- Just my 0.0002 million dollars worth, Shawn Programming is as much

Re: split

2012-04-04 Thread lina
On Wed, Apr 4, 2012 at 8:57 PM, Anamika K anamika...@gmail.com wrote: Hello All, I have a file like this: NM_009648,NM_001042541:1        0.955794504181601 NM_019584:1     0.900900900900901 NM_198862:1     0.835755813953488 NM_001039093,NM_001039092,NM_153080:1   0.805008944543828 and

Re: split

2012-04-04 Thread Rob Dixon
On 04/04/2012 13:57, Anamika K wrote: Hello All, I have a file like this: NM_009648,NM_001042541:10.955794504181601 NM_019584:1 0.900900900900901 NM_198862:1 0.835755813953488 NM_001039093,NM_001039092,NM_153080:1 0.805008944543828 and want output like this: NM_009648

Re: Using the ternary operator to concat a string not working like I think?

2012-04-04 Thread Shlomi Fish
Hi Cyril, I'm CCing the list - I hope it's OK (see the last line of my signature for more information). On Wed, 4 Apr 2012 12:22:41 -0400 Cyril Deba cyril.d...@gmail.com wrote: Hi Shlomi, I did read your statement about using ternary statements. So, just to confirm. You think that the

Re: Using the ternary operator to concat a string not working like I think?

2012-04-04 Thread John W. Krahn
Shlomi Fish wrote: Hi Cyril, I'm CCing the list - I hope it's OK I hate handling carbon copies, you always get that black stuff all over your hands! John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the