How do you use a shell command in a sprintf. Im trying to add the week of the year to the end of my file name:
my $logfile = sprintf '/var/sno/weeks/week_'. `date +%W`.'/%02d%02d%02d%02d%02d.sno', $year % 100, $mon + 1, $day, $hour, $min; but when it is used I get: bash-2.03# ./script.pl Cannot open /var/sno/weeks/03_week_38 /0309230800.sno: No such file or directory at /opt/sno/script/script.pl line 16. [1] 18019 [1] Exit 2 /opt/sno/script/script.pl line 16: open LOG, '>', $logfile or die "Cannot open $logfile: $!"; It like its putting in a return in the $logfile?? Thanks Up front. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]