Douglas0028 has asked for the wisdom of the Perl Monks concerning the following question:
Hello again everyone. I'm having some trouble trying to figured out a method for printing a certain statement based on whether or not I have values
What I mean is, that I have four values "Years", "Months", "Weeks", and "Days". When I'm checking someone's age, one or more of those values may be 0, for instance if today was my birthday it would just be years, or if my birthday was three days ago, I would only have values for "Years" and "days." So I've been trying to figure out if there is some way to check for that, without having to write out "if" statements for every possible combination, cause that would look ugly, and there must be a better way. Ugh, please help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing based on values?
by toolic (Bishop) on Mar 26, 2011 at 23:27 UTC | |
by Douglas0028 (Novice) on Mar 26, 2011 at 23:46 UTC | |
by toolic (Bishop) on Mar 26, 2011 at 23:58 UTC | |
by Douglas0028 (Novice) on Mar 27, 2011 at 00:16 UTC | |
by toolic (Bishop) on Mar 27, 2011 at 00:24 UTC | |
|
Re: Printing based on values?
by Douglas0028 (Novice) on Mar 27, 2011 at 00:43 UTC |