On Sep 23, rmck said:
>my $logfile = sprintf '/var/sno/weeks/week_'. `date
>+%W`.'/%02d%02d%02d%02d%02d.sno',
> $year % 100, $mon + 1, $day, $hour, $min;
>
>It like its putting in a return in the $logfile?? Thanks Up front.
Yes, it is, because `...` returns the program's output, which for date
includes a newline at the end. You could do this:
my $logfile =
sprintf '/var/sno/weeks/week_%d/%02d%02d%02d%02d%02d.sno',
`date '+%W'`, $year % 100, $mon + 1, $day, $hour, $min;
That uses `date ...` as an argument to sprintf, set as '%d', so the
newline will not be rendered in the filename.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]