Re: one last thought on printf

2001-06-02 Thread Christian Campbell
David Gilden wrote: > ($sec, $min, $hour, $wday, $month, $year) = (localtime)[0..5]; The slice is not needed; ($sec, $min, $hour, $wday, $month, $year) = localtime; is fine. (Extra elements in a list assignment are ignored.) > 3: $month++; # perl counts from -1 on occasion I think y

Re: one last thought on printf

2001-06-02 Thread Abdulaziz Ghuloum
On Sat, 2 Jun 2001 12:26:20 -0400, David Gilden said: > Also I am creating unique files and was thinking of the following: > > $unique_file_name 'fourm'. (localtime) . '.html'; > > is there a better way of doing this, I am saving each entry froma web based guest >book as > a separate .h

one last thought on printf

2001-06-02 Thread David Gilden
In the following chunk, ($sec, $min, $hour, $wday, $month, $year) = (localtime)[0..5]; 1: $year += 1900; 2: $wday = "0" . $wday if $wday < 10; # adds a leading zero , not needed 3: $month++; # perl counts from -1 on occasion 4: $month = "0" . $month if $month < 10; # same as above # this