perl beginner

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

  1. hsvjap

    hsvjap

    Joined:
    Mar 15, 2008
    Messages:
    17
    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. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,871
  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:
    658
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Feb 3, 2005
  3. Rensjuh
    Replies:
    7
    Views:
    1,049
    Mabden
    Sep 2, 2004
  4. william nelson

    Beginner's Beginner

    william nelson, Apr 11, 2011, in forum: Ruby
    Replies:
    7
    Views:
    263
    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:
    336
    PerlFAQ Server
    Jan 23, 2011
Loading...

Share This Page