Who uses WX instead of TK

2015-04-02 Thread Sherman Willden
Or do you use it with TK? I downloaded Padre and found the examples which included WX. WX seems to be easier to use than TK. Just wondering who uses WX and why. Thank you; Sherman

Re: How to handle null elements inside an array

2015-04-02 Thread Andrew Solomon
Hi Anirban 'unless ($dev)' is just the same as 'if(not ($dev))' and it means 'if this string (from which I've removed all the spaces) is empty do ... ' Does that answer your question? Andrew On Thu, Apr 2, 2015 at 5:05 PM, Anirban Adhikary wrote: > Hi Andrew > > From your code I have comple

Re: How to handle null elements inside an array

2015-04-02 Thread Anirban Adhikary
Hi Andrew >From your code I have completed the code and it is working fine. I am pasting here the final code. #!/usr/bin/perl use strict; use warnings; 1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 my $Input_File_Name = "inputdir/MAT4BE_SC_STD_INFO"; 7 open my $RFH,'<',$Inpu

Re: How to handle null elements inside an array

2015-04-02 Thread Dejian Zhao
I think you should study your data first. For example, how are those fields separated? Usually fields are tab-delimited. If this is true with your data, you can split lines with split(/\t/,$line), then the fields will be correctly separated. On 4/2/15 10:43 AM, Anirban Adhikary wrote: Hi List

Re: How to handle null elements inside an array

2015-04-02 Thread Shawn H Corey
On Thu, 2 Apr 2015 08:34:37 -0700 SSC_perl wrote: > On Apr 2, 2015, at 7:43 AM, Anirban Adhikary wrote: > > When I am trying to split the line based on whitespace > > @elements = split(/\s+/,$line); > > It will be interesting if someone can come up with a solution > to this, but I don't se

Re: How to handle null elements inside an array

2015-04-02 Thread Andrew Solomon
Or more politely... :) https://gist.github.com/anonymous/2ebb0441bcdec4a94e48 On Thu, Apr 2, 2015 at 4:43 PM, Andrew Solomon wrote: > Hi Anirban > > I haven't completely solved the problem - only addressing the DEV field, > but I hope this points you in the right direction! > > cheers > > And

Re: How to handle null elements inside an array

2015-04-02 Thread Andrew Solomon
Hi Anirban I haven't completely solved the problem - only addressing the DEV field, but I hope this points you in the right direction! cheers Andrew #!/usr/bin/env perl use strict; use warnings; # NOTE This assumes the space aren't tabs and the columns are aligned my $input = ' SCGR SC

Re: How to handle null elements inside an array

2015-04-02 Thread SSC_perl
On Apr 2, 2015, at 7:43 AM, Anirban Adhikary wrote: > When I am trying to split the line based on whitespace > @elements = split(/\s+/,$line); It will be interesting if someone can come up with a solution to this, but I don't see one. If your separator is whitespace, then the split has

How to handle null elements inside an array

2015-04-02 Thread Anirban Adhikary
Hi List I would like to process a file which has the following structure. SCGR SC DEVDEV1 NUMDEV DCP STATE REASON 10 31 1 SCGR SC DEVDEV1 NUMDEV DCP STATE REASON 20