Re: checking all pieces of split data for NULL

2004-08-13 Thread Jeff 'japhy' Pinyan
On Aug 10, Tim McGeary said: Jeff 'japhy' Pinyan wrote: my @field_names = qw( ID name_f name_l email id contact group member ); my %long_names; @[EMAIL PROTECTED] = ( 'ID', 'First Name', 'Last Name', 'Email Address', 'id', 'Contact', 'Group', 'Member', ); while (INPUT)

Re: checking all pieces of split data for NULL

2004-08-13 Thread Tim McGeary
Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: Jeff 'japhy' Pinyan wrote: my @field_names = qw( ID name_f name_l email id contact group member ); my %long_names; @[EMAIL PROTECTED] = ( 'ID', 'First Name', 'Last Name', 'Email Address', 'id', 'Contact', 'Group', 'Member', );

Re: checking all pieces of split data for NULL

2004-08-13 Thread Radhika Sambamurti
Hi, Just for extra information, I am interested in understanding how the if (grep length == 0, @arrayname) works. Or perhaps I could be pointed to some documentation ie perldoc where i could find out more about is it the length function? works. thanks, radhika while (INPUT) { chomp;

RE: checking all pieces of split data for NULL

2004-08-13 Thread Raymond Raj
use perldoc -f length try perldoc perldoc how to use perldoc -Original Message- From: Radhika Sambamurti [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 11, 2004 11:16 PM To: [EMAIL PROTECTED] Subject: Re: checking all pieces of split data for NULL Hi, Just for extra

Re: checking all pieces of split data for NULL

2004-08-10 Thread Tim McGeary
Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: follow-up question: will this only be true if $item of @array is completely empty? This is the type of data for each $item of @array: ID, name_f, name_l, email, id, contact, group, member I am splitting this by commas into different

Re: checking all pieces of split data for NULL

2004-08-10 Thread Jeff 'japhy' Pinyan
On Aug 10, Tim McGeary said: follow-up question: will this only be true if $item of @array is completely empty? This is the type of data for each $item of @array: ID, name_f, name_l, email, id, contact, group, member I am splitting this by commas into different $scalers to manipulate. And I

Re: checking all pieces of split data for NULL

2004-08-10 Thread Jose Alves de Castro
On Tue, 2004-08-10 at 15:01, Tim McGeary wrote: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? Let's say you have your line split in @line if

Re: checking all pieces of split data for NULL

2004-08-10 Thread Wiggins d Anconia
I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? Thanks, Tim Do you mean something like? foreach my $piece (split /\|/, $line) { if

RE: checking all pieces of split data for NULL

2004-08-10 Thread Moon, John
-Original Message- From: Tim McGeary [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 10:01 AM To: [EMAIL PROTECTED] Subject: checking all pieces of split data for NULL I have a file of data that I want to safety check to ensure that there is data for each piece of the line

Re: checking all pieces of split data for NULL

2004-08-10 Thread JupiterHost.Net
Tim McGeary wrote: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? How about this: for(@lines) { chomp; print ERRLOG 'Blank line' if $_ eq '';

Re: checking all pieces of split data for NULL

2004-08-10 Thread Tim McGeary
this didn't go through the first time... resending... Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to

Re: checking all pieces of split data for NULL

2004-08-10 Thread Tim McGeary
Tim McGeary Senior Library Systems Specialist Lehigh University 610-758-4998 [EMAIL PROTECTED] Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: follow-up question: will this only be true if $item of @array is completely empty? This is the type of data for each $item of @array: ID,

RE: checking all pieces of split data for NULL

2004-08-10 Thread Bob Showalter
Tim McGeary wrote: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? die One or more fields is zero length\n if grep !length, @fields; die One

Re: checking all pieces of split data for NULL

2004-08-10 Thread Tim McGeary
Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? Assuming you store the data in an array, you

Re: checking all pieces of split data for NULL

2004-08-10 Thread Jeff 'japhy' Pinyan
On Aug 10, Tim McGeary said: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? Assuming you store the data in an array, you can simply say: if (grep

Re: checking all pieces of split data for NULL

2004-08-10 Thread Tim McGeary
Jeff 'japhy' Pinyan wrote: On Aug 10, Tim McGeary said: I have a file of data that I want to safety check to ensure that there is data for each piece of the line being split. Is there a fast way to say If any of these are '' then write to error log? Assuming you store the data in an array, you

Re: checking all pieces of split data for NULL

2004-08-10 Thread Jeff 'japhy' Pinyan
On Aug 10, Tim McGeary said: sub empty_fields { my $msg = You left these fields empty: ; $msg .= join , , @[EMAIL PROTECTED]; # displays $msg to the user somehow } How do I force that AND not output both parts of the hash since I just want the values, not the keys. What do you