http://qs1969.pair.com?node_id=52074


in reply to TIMTOWTDI -- so long as it's not my way

My most recent was print printf("%03d\n", $number); and it took way to long to figure out where the extra one was coming from.

And another one from a long program that wrote a bunch of files, but got rid of any empty ones.
# The code as it was executed open filehandles print "to file"; # This was anything from # a few to huge # of items #cleanup dir go through directory and unlink any empty files close filehandles
For some reason if the program didn't have much to say I'd wind up with fewer files than expected.

Replies are listed 'Best First'.
Re: Re: TIMTOWTDI -- so long as it's not my way
by extremely (Priest) on Jan 16, 2001 at 02:52 UTC
    Hmm I just did sprintf "%02d%02d", @nums, $/; today. After a while of trying to figure out why it didn't print anything I said, Ahh! and took the "s" off the front.

    THEN began the puzzling over why the newline wasn't printing. =)

    --
    $you = new YOU;
    honk() if $you->love(perl)