B
bobmct
Fellow mongers;
I've done research in my many perl books as well as numerous perl
references on the web and still am confused on this rather simple
situation (embarrassingly so):
I need to compare two variables for presence of content to meet the
following tests:
VarA = present and VarB = present then false
VarA = empty and VarB = empty then false
VarA = present and VarB = empty then true
VarA = empty and VarB = present then true
-or-
As I more simply thought of if:
VarA ne VarB then true
Each Var could contain
1) an empty string
2) a string value
3) a numeric value
4) a space
I cannot seem to get a consistent result from the various methods I've
used.
Any recommendations or suggestions greatly appreciated.
Thanks - B
I've done research in my many perl books as well as numerous perl
references on the web and still am confused on this rather simple
situation (embarrassingly so):
I need to compare two variables for presence of content to meet the
following tests:
VarA = present and VarB = present then false
VarA = empty and VarB = empty then false
VarA = present and VarB = empty then true
VarA = empty and VarB = present then true
-or-
As I more simply thought of if:
VarA ne VarB then true
Each Var could contain
1) an empty string
2) a string value
3) a numeric value
4) a space
I cannot seem to get a consistent result from the various methods I've
used.
Any recommendations or suggestions greatly appreciated.
Thanks - B