Re: awk to Perl

2012-08-25 Thread thebarn...@gmail.com
> I'm tyring to covert an AWK script to Perl. Is there a better alternative > > then a2p? write down logically what you want to achieve with the awk script ( pseudocode ) then write it in perl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginner

Re: a condition

2012-08-25 Thread John W. Krahn
Wang, Li wrote: Dear All Hello, I have an array of a series of strinngs. I want to set up a condition in which all the scalers in the array are not the same. For example AB AB AB AB AB (delete the array) AB AC AB AB AB (Keep the array) AB AC AD AB AB (keep) $ perl -le' for ( [ "AB", "AB",

Re: a condition

2012-08-25 Thread Alan Haggai Alavi
Hello Li, The `notall` function of `List::MoreUtils` (https://metacpan.org/module/List::MoreUtils) can be made use of along with Perl's `grep` function: #!/usr/bin/env perl use strict; use warnings; use List::MoreUtils qw( notall ); my @array = ( 'AB AB AB AB AB', 'AB AC AB AB AB',

Re: a condition

2012-08-25 Thread Praveen Kumar
On Sat, Aug 25, 2012 at 8:29 PM, Wang, Li wrote: > Dear All > > I have an array of a series of strinngs. I want to set up a condition in > which all the scalers in the array are not the same. > > For example > > AB AB AB AB AB (delete the array) > AB AC AB AB AB (Keep the array) > AB AC AD AB AB

a condition

2012-08-25 Thread Wang, Li
Dear All I have an array of a series of strinngs. I want to set up a condition in which all the scalers in the array are not the same. For example AB AB AB AB AB (delete the array) AB AC AB AB AB (Keep the array) AB AC AD AB AB (keep) Sorry for the naive questions! Best wishes Li