Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > FileHandles to string

Reply
Thread Tools

FileHandles to string

 
 
Andrew
Guest
Posts: n/a
 
      07-10-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 5.9 How can I make a filehandle local to a subroutine? How do I pass filehandles between subroutines? How do I make an array of filehandles? PerlFAQ Server Perl Misc 0 01-12-2011 11:00 PM
Howto share filehandles between threads? Sako Perl 3 06-05-2006 03:37 PM
FileHandles to string Andrew Perl 1 07-10-2004 06:00 PM
FileHandles to string Andrew Perl 0 07-10-2004 05:18 PM
newbie - Output to multiple Filehandles Jeremy Phillips Perl 1 05-25-2004 01:38 AM



Advertisments