Re: File::Copy Adds a ?

From: Tulan W. Hu (twhu_at_lucent.com)
Date: 10/08/03


Date: Wed, 8 Oct 2003 15:08:55 -0400


"Sylvie Stone" <sylviestone@canada.com> wrote in message ...
> Hi group -
>
> Can someone tell me why this command is adding a question mark to the file
name:
>
> #!/usr/bin/perl
> $month=`/bin/date | awk '{print \$2\$6}'`;

**** chomp($month); # maybe the ? is a newline.
>
> if (blah blah blah) {
> copy("total.txt","total.$month");
> }
>
>
>
> [root]# ls -l total.*
> -rw-rw-r-- 1 root root 13 Oct 8 12:31 total.Oct2003?
> -rw-rw-rw- 1 nobody nobody 13 Oct 8 07:35 total.txt
> [root@alert StandardsAlert]# more total.Oct2003?
> 1|0|0|0|0|1|1
> [root@alert StandardsAlert]# more total.Oct2003
> total.Oct2003: No such file or directory
>
>
> THANK YOU!
>
> Syl.