in reply to Re^5: Yesterday Date
in thread Yesterday Date

Nope. You added two bugs

If you start on a Monday, that'll give you the Saturday. That's why a loop was used.

If you start on a day other than Sunday or Monday, it won't print anything. That's why the print was outside the loop.

Replies are listed 'Best First'.
Re^7: Yesterday Date
by Anonymous Monk on Feb 05, 2008 at 13:15 UTC
    OK, good point, now what does this line do?

    print $d, $/;

    can I use the result with just this:

    print "$d";


    Thanks!

      $/ is a fancy (and possibly silly) way of saying "\n"

      By the way, putting quotes around nothing but a variable ("$d") is useless, weird and confusing.