Dear All,

I want to display the content of a file which I will be exporting to the module Locale::Maketext::Lexicon. For example there is a file "/abc/cde.po" and I wan to access this file using the above module.

Please let me know how to display the content of the file where as I am using the CGI environment.


SSS.pm
package SSS; use lib '../lib/perl-5.8.3/lib/site_perl'; use base Locale::Maketext; use Locale::Maketext::Lexicon { '*' => [Gettext => '../abc/*.po'], _auto => 1, _style => 'gettext', }; use strict; 1;
I use this module inside my CGI file as follows:

program.cgi
use CGI; use SSS; my $q = new CGI(); my $sf = pot::SF->new; # pot::SF is a user-defined module my $lang_to_use = get_lang($q->http('Accept-language'), $sf->{LANGUAGE +S}) ; $lang_to_use = $sf->{LANG_DEFAULT} if (!defined($lang_to_use)); my $lh = SSS->get_handle($lang_to_use);

Once we get the file handle $lh for SSS.pm, how do we display the content of the file.

Thanks in advance.

In reply to How to display the content of a file by rellaboyina

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.