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 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 () {
> chomp;
> m
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',
);
whi
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',
>> );
>>
>>
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, no
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
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 (
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, yo
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;
d
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, name_f
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 er
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 '';
-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
> 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) {
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
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.
>A
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 $scaler
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
--
Tim McGeary
Senior Library Systems Specialist
Lehigh University
610-758-4998
[EMAIL
18 matches
Mail list logo