perl beginner

Discussion in 'Perl' started by hsvjap, Dec 12, 2008.

  1. hsvjap

    hsvjap

    Joined:
    Mar 15, 2008
    Messages:
    17
    Likes Received:
    0
    hi all,

    Iam a beginner in perl, so i need some inputs to the below mentioned .

    <page id="c_page_popup_click" visuals="visuals/popup/v_page1_popup_Primenumber.tml" dataSources3="@m_ds_designofaproject.popup_click">

    the above text is to printed again with the word "click" replaced from another word , say anything taken from a xl sheet.


    wat i did was, at all underscores i split them using $break, but many _ are there,

    i created final array inserted the replacing texts and finally printed it .

    the code is here



    #MODULE 8-SPLIT THE FORMAT INTO DIFFERENT ARRAY ELEMENTS WHENEVER _ IS ENCOUNTERED
    @part1=split("_",$break);
    print "@part1\n";


    $final[0]=$part1[0];
    $final[1]="_";
    $final[2]=$part1[1];
    $final[3]="_";
    $final[4]=$part1[2];
    $final[5]="_";
    $final[6]=$part1[3];
    $final[7]="_";
    $final[8]=$part1[4];
    $final[9]="_";
    $final[10]=$part1[5];
    $final[11]="_";
    $final[12]=$part1[6];

    $final[14]=$name;

    $last=')"/>';

    $final[15]=$last;

    #print "@final\n";


    the $ name is replacing string.



    any suggestions for improvement are appreciated.

    thanks in advance,

    hsvjap.
     
    hsvjap, Dec 12, 2008
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    2,359
  2. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    No Class at ALL!!! beginner/beginner question

    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Feb 2, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    1,018
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Feb 3, 2005
  3. Rensjuh
    Replies:
    7
    Views:
    1,510
    Mabden
    Sep 2, 2004
  4. william nelson

    Beginner's Beginner

    william nelson, Apr 11, 2011, in forum: Ruby
    Replies:
    7
    Views:
    675
    7stud --
    Apr 12, 2011
  5. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    608
    PerlFAQ Server
    Jan 23, 2011
  6. PerlFAQ Server
    Replies:
    0
    Views:
    1,107
    PerlFAQ Server
    Feb 3, 2011
  7. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    611
    PerlFAQ Server
    Feb 27, 2011
  8. PerlFAQ Server
    Replies:
    0
    Views:
    1,082
    PerlFAQ Server
    Apr 4, 2011
Loading...