FileHandles to string

A

Andrew

Hi all,
I am having trouble opening a file and displaying its contents. I have
built into the code test strings and tried to display them, and all
have no output (i am assuming that is because they are all
null-pointers), and the code is part of a cgi.
Any help would be appreciated, the code is below, and the lines
commented out are the ones crashing!

open(File, "> /someWhere/My.txt") || die $errorString="can't
open";
@ThreadPairs = <File>;
foreach $items(@ThreadPairs){
($ThreadPosition,$ThreadName)=split(/=/,$items,2);
$fields{$ThreadPosition}=$ThreadName;
}
if($fields{Thread} == 2){ $tempTest="yes"}
$finalCount = "1" + $fields{Thread};
for($PosCount = 1; $PosCount < $finalCount; $PosCount++){
$tempThreadPos = "Thread"."$PosCount";
$tempThreadName = $fields{$tempThreadPos};
}
close(File);
}

thanks All
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top