Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > perl beginner

Reply
Thread Tools

perl beginner

 
 
hsvjap hsvjap is offline
Junior Member
Join Date: Mar 2008
Posts: 21
 
      12-12-2008
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginner's Beginner william nelson Ruby 7 04-11-2011 11:23 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
No Class at ALL!!! beginner/beginner question =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?= ASP .Net 7 02-03-2005 02:47 PM
Tutorial for beginner/ Tutorial voor beginner Rensjuh C++ 7 09-02-2004 12:41 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments