Shivangi17 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

This is my first post to perlmonks and i am new to perl

I have a text document and i want to add hyperlinks to text. please suggest me how to give hyperlinks in perl? for example:

ABC,XYZ,PQR

i have columns in csv format and i want to give hyperlink to XYZ. means when i click on XYZ it should go to www.google.com

Thanks

Replies are listed 'Best First'.
Re: Give hyperlink to text perl
by marto (Cardinal) on Aug 01, 2014 at 11:09 UTC

    "i have columns in csv format and i want to give hyperlink to XYZ. means when i click on XYZ it should go to www.google.com"

    CSV and text files do not support hyperlinks.

Re: Give hyperlink to text perl
by Anonymous Monk on Aug 01, 2014 at 11:01 UTC

    Hello Shivangi17, welcome. Please have a look at the Perl Monks guide to the Monastery and How do I post a question effectively?

    If you're very new to Perl, you should probably start with perlintro.

    Normally one would read a CSV file with the module Text::CSV. There are several modules to generate HTML output for you, take a look at the CPAN. One module of many is HTML::Template, or in your case maybe HTML::Table would be helpful.

    Your question does not include enough sample input and output data to give a good answer. Especially the output: I am only guessing that you're talking about HTML? Will the CSV rows be embedded into an HTML file, or transformed into the desired output format in some other way?

    Please have a look at the documentation linked above, and provide more sample input data and some of the expected output. If you've written some code that you have questions about, please feel free to post that here too.

      Thanks for the reply.

      my output would be in any other format like PDF. i'm generating PDF reports

      Thnaks

Re: Give hyperlink to text perl
by zentara (Cardinal) on Aug 01, 2014 at 15:57 UTC