Meghanand Acharekar wrote:
Hi,
Hello,
Thanx for helpIt was a silly mistake, I put a '\n' due to usual practice ,
The prob is resolved, by not using join.
Now
$middle=sprintf "%4d-%02d-%02d",$year+1900,$mon+1,$mday;
and
$file_name=$prefix."_".$middle.$suffix;
Or just:
my $file_name = sprintf '%s_%4d-%02d-%02d%s', $prefix, $year + 1900,
$mon + 1, $mday, $suffix;
But still a bit curios about this
if I do
$middle=`date +%F`;
I get result ( the new line prob),
New File name : log_2009-07-07
.gz
It there any way to do it
use POSIX 'strftime';
my $middle = strftime '%F', localtime;
John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/