ok, first, what are you trying to do?
secondly, dont put a filehandle in an array.. it's A BAD THING!
this means you're slurping the entire file into memory, as well as having to
allocate a bit of extra memory for perl to understand each line should be a
different value of the array.

if you're simply wanting to take out the 3rd until the 6th element, try
splice
(perldoc -f splice)

now, to your error msg:
it is probably saying that the file you opened didnt contain any data;

try this:

open I, "thefile.txt" or die $!;
while(<I>) { print } #make sure there's data

furthermore make sure you open your file handle with:
open FH, "+>thefile.txt" to have both read and write access, since you're
both reading AND writing to the file in your code.

hth
Jos Boumans

> 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 ?
>
>



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

Reply via email to