On Wednesday, June 12, 2002, at 07:07 , phumes1 wrote:

>
> I'm using the following command to output the results to screen and a 
> output file:
>
> open(F,"tee $2 @ARGV[0].txt >CON:");
>
> This works great but the output file created <filename>.txt has a "box" 
> ascii character. Looks like a carraige return also.
> How can I remove this?


WOW I am impressed that it even worked...

I would have probably one something like

        my $fileName = join '.' , $ARGV[0], txt ;

or maybe even

        my $Fcommand = "tee $2 $ARGV[0].txt >CON:";
        open(F, $Fcommand) or die ....

And have the double quote interpolation done first...

Note also $ARGV[index] - vice @ARGV[index] construct

I thought that since you were 'piping' to a command,
in this case "tee" that you really wanted to have say

        my $Fcommand = "|tee $2 $ARGV[0].txt >CON:";

hence my small surprise there...

ciao
drieux

---


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

Reply via email to