Hello,

I have a lot of fields being concatenated to form a string and sometimes the 
values are empty, so i am getting this error:

Use of uninitialized value in concatenation (.) or string at ./script.pl line 
144, <$IN_FH> line 1.

how can i suppress this?

my logic flow:


$string1 = "a,b,c,d,e,f,........ a very long record"

i only want few fields from this record of hundreds of fields, so

@array = split(/,/,$string1)

then reassemble the array elements into the new string:

$string2 = $array[3]." ".$array[7]." ".$array[24].... and so on....

so whenever anything like $array[24] is empty and it occurs in concatenation 
above i get this error:

Use of uninitialized value in concatenation (.) or string at ./script.pl line 
144, <$IN_FH> line 1.

how to suppress or avoid this error?

ty.
R


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to