@temp=<TEMP>; #implies that TEMP is a read file handle
print TEMP @temp; #implies that TEMP is a write file handle.

I'm pretty sure that you can only do either read or write, but not both
to the same FILE HANDLE. You can open 2 handles to the same file (which
can cause a few problems...), but if you are trying to write to a 2nd
file, use a different file handle

open(TEMP,"<file"); #read mode
open(TEMP2,">>file"); #append mode
@temp = <TEMP>;
...
print TEMP2 @temp; 
#poor use of variable all around, but you get the point.

-Akshay

COLLINEAU Franck FTRD/DMI/TAM wrote:
> 
> this code doesn't work:
> 
>         @temp=<TEMP>;
>         $temp[2]="";
>         $temp[3]="";
>         $temp[4]="";
>         $temp[5]="";
>         print TEMP @temp;
> 
> The error message is "Use of uninitialized value in print at 01_info.pl line
> 25, <TEMP> line 1."
> 
> can anybody help me ?
> 
> Franck
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
http://www.5vs1.com - A Pearl Jam Fan Site

"Only when the last tree is dead, the last river damned, and the last
field paved, will we realize that we can't eat money."

"Time is long and life is short, so begin to live while you still can."
                        -Eddie Vedder

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

Reply via email to