|Think about Loose Coupling|
concating problemby doubtingben (Novice)
|on Apr 21, 2003 at 17:11 UTC||Need Help??|
doubtingben has asked for the
wisdom of the Perl Monks concerning the following question:
I am at my wits end here. I am trying to change a date format from month/day/year to year-month-day. Easy right? This works as expected:
but this doesn't :
$new_date becomes: "-month-day". I tried:
$new_date = $year.'-'.$month.'-'.$day;
But I get the same result. After some experimentation, it seems the month is starting at the beginning of the string, and overwriting everything after it. During debugging, I see the split works fine, I just can't seem to put it back together correctly.
Can anyone enlighten me?
The worst feeling?
Realizing what you thought was true, is not.