Re: [webmin-devel] read_file_lines() truncating line?

David Filion <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
Jamie Cameron wrote:
> On Mon, 2004-09-13 at 11:11, David Filion wrote:
> 
>>I'm reading in a file using:
>>
>>my $file = read_file_lines($config {"sc_serv_conf"});
>>
>>$config {"sc_serv_conf"} points to a text file.  $file reports 323 
>>lines.  So far so good.  Line 142 in the file I've read in is:
>>
>>; AdminPassword=adminpass
>>
>>However when I print line 142 of $file using:
>>
>>print $file->[142]; print "<br>\n";
>>
>>All I get is:
>>
>>142  ;AdminPassword=
>>
>>The text after the '=' is truncated (or so it appears). Anyone have any 
>>suggestions as to what happened to the remainder of the line?
> 
> 
> Make sure you haven't set the Perl line separator $/ to something
> anywhere in your code. If it is set to anything other than the default
> "\n" , many Webmin functions will be confused by changes the Perl
> functions that read a line from a file.
> 
>  - Jamie
> 
> 

I haven't touched it.  I'm goign to pring each element of the array and 
see if any other lines are truncated.

Thanks,

David


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.