Can't be sure: we don't know (for instance) what
$user_input contains, and making assumptions about that wouldn't help you solve this.
Do you mean by "I am not getting the desired o/p. I am handling end_date text box empty case" that you are getting the output you want for the empty case but not for the other one, or that the empty case isn't being handled right? I assume you mean the second ... but I still can't tell from what you've posted where the problem is. Need more context.
What is the smallest piece of code that runs and exhibits the aberrant behavior? (By the way, once you have that, you have a test for this bug, and the start of a test suite!)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.