in reply to TIMTOWTDI Challenge: Create a filename
This produces output of the sort:use strict; use warnings; use Time::HiRes qw/gettimeofday/; while (1) { my $fname = create_filename_from_current_time(); print "Filename is '$fname'\n"; } sub create_filename_from_current_time { (my $fname = gettimeofday) =~ y/0-9/etaonirsuy/; return $fname; }
I like that the "extension" of the first filename in the list is coincidentally a real word!Filename is 'taotiaueta.retry' Filename is 'taotiaueta.retso' Filename is 'taotiaueta.retsu' Filename is 'taotiaueta.retuo' Filename is 'taotiaueta.retuu' Filename is 'taotiaueta.retya' Filename is 'taotiaueta.retys' Filename is 'taotiaueta.reaea' Filename is 'taotiaueta.reaes' Filename is 'taotiaueta.reatt' Filename is 'taotiaueta.reatr' Filename is 'taotiaueta.reaat' Filename is 'taotiaueta.reaai' Filename is 'taotiaueta.reao'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TIMTOWTDI Challenge: Create a filename
by andreas1234567 (Vicar) on Jan 11, 2009 at 14:05 UTC | |
by ysth (Canon) on Jan 11, 2009 at 22:55 UTC | |
by ikegami (Patriarch) on Jan 11, 2009 at 23:03 UTC | |
by ysth (Canon) on Jan 11, 2009 at 23:27 UTC | |
by ikegami (Patriarch) on Jan 11, 2009 at 23:33 UTC |