Tim Davis wrote:
> 
> my $month = length((localtime)[4] + 1) == 1 ? '0' . ((localtime)[4] + 1) : 
>(localtime)[4] + 1;
> my $day = length((localtime)[3]) != 1 ? (localtime)[3] : '0' . (localtime)[3];
> my $monthday = $month . $day;
> my $output_file = join ('_', 'resend' , $monthday , "$key");
> ....
> 
> Is there a more elegant way of doing this?


my $output_file = sprintf 'resend_%02d%02d_%s', (localtime)[4,3], $key;


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to