<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet type="text/xsl" href="http://www.daniweb.com/js/rss.xsl"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community
			 - Perl					</title>
		<link>http://www.daniweb.com/software-development/perl/112</link>
		<description>Our Perl forum is the place for Q&amp;A-style discussions related to this scripting language. Note that we also have a separate Shell Scripting forum within the Software Development category.</description>
		<language>en-US</language>
		<ttl>60</ttl>
		<!-- PubSubHubbub Discovery -->
		<link rel="hub" href="http://daniweb.superfeedr.com/" xmlns="http://www.w3.org/2005/Atom" />
		<link rel="hub" href="http://pubsubhubbub.superfeedr.com/" xmlns="http://www.w3.org/2005/Atom" />
		<link rel="hub" href="http://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />
		<link rel="self" href="http://www.daniweb.com/rss/pull/112" xmlns="http://www.w3.org/2005/Atom" />
		<!-- End Of PubSubHubbub Discovery -->
				<item>
			<title>Replace string with a &#039;/&#039; in the middle</title>
			<link>http://www.daniweb.com/software-development/perl/threads/456180/replace-string-with-a-in-the-middle</link>
			<pubDate>Fri, 07 Jun 2013 22:35:34 +0000</pubDate>
			<description>I would like to replace 'cat/dog/cat' with 'cat/tiger/deer' in a particular .txt file. How should I do this in perl? I tried /usr/bin/perl -p -i -e &quot;s/'cat/dog/cat'/'cat/tiger/deer'/g&quot; sample.txt but it didn't work.</description>
			<content:encoded><![CDATA[ <p>I would like to replace 'cat/dog/cat' with 'cat/tiger/deer' in a particular .txt file. How should I do this in perl?</p>

<p>I tried   /usr/bin/perl -p -i -e "s/'cat/dog/cat'/'cat/tiger/deer'/g" sample.txt<br />
but it didn't work.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>nicetapo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/456180/replace-string-with-a-in-the-middle</guid>
		</item>
				<item>
			<title>relational algebra parser</title>
			<link>http://www.daniweb.com/software-development/perl/threads/455887/relational-algebra-parser</link>
			<pubDate>Mon, 03 Jun 2013 16:45:48 +0000</pubDate>
			<description>I want a perl parser for relational algebra expression, can anybody help me with a code for that.</description>
			<content:encoded><![CDATA[ <p>I want a perl parser for relational algebra expression, can anybody help me with a code for that.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>magaji ahmed</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/455887/relational-algebra-parser</guid>
		</item>
				<item>
			<title>perl appending variables to a file after first variable it adds newline</title>
			<link>http://www.daniweb.com/software-development/perl/threads/455403/perl-appending-variables-to-a-file-after-first-variable-it-adds-newline</link>
			<pubDate>Mon, 27 May 2013 16:21:47 +0000</pubDate>
			<description>i was trying to create csv file by appending variables using print function what's wrong with this code why this prints &quot;,&quot;.&quot;$j&quot; to a new line **code is here - ** while( $i &lt; 1000 ){ $j = 1; while( $mean_data_sorted[$i] == $mean_data_sorted[$i+1] ){ $i++; $j++; } open( nofile, '&gt;&gt;', ...</description>
			<content:encoded><![CDATA[ <p>i was trying to create csv file by appending variables using print function<br />
what's wrong with this code why this prints ","."$j" to a new line</p>

<p>**code is here - **</p>

<pre><code class="language-perl">while( $i &lt; 1000 ){
    $j = 1;
    while( $mean_data_sorted[$i] == $mean_data_sorted[$i+1] ){
        $i++;
        $j++;
    }
    open( nofile, '&gt;&gt;', 'meanint.csv' );
    print nofile "$mean_data_sorted[$i]" . "," . "$j" . "\n";
    close nofile;
    $i++;
}
</code></pre>

<p>**real output - **<br />
-0.667<br />
,33<br />
-0.663<br />
,23<br />
-0.656<br />
,19<br />
-0.655<br />
,32<br />
-0.619<br />
,23</p>

<p>**the output i want - **<br />
-0.667,33<br />
-0.663,23<br />
-0.656,19<br />
-0.655,32<br />
-0.619,23</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>rajesrmbioinfo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/455403/perl-appending-variables-to-a-file-after-first-variable-it-adds-newline</guid>
		</item>
				<item>
			<title>Find a String in Several Files at a ago</title>
			<link>http://www.daniweb.com/software-development/perl/code/454868/find-a-string-in-several-files-at-a-ago</link>
			<pubDate>Sat, 18 May 2013 12:41:45 +0000</pubDate>
			<description>I really got bored and tired of trying to find or remember some codes usage in so many files saved on my system, when it was needed. So, I called 'Monsieur' perl for help, hacking together some codes which works great for me and solve my problem of boredom. You ...</description>
			<content:encoded><![CDATA[ <p>I really got bored and tired of trying to find or remember some codes usage in so many files saved on my system, when it was needed.</p>

<p>So, I called 'Monsieur' perl for help, hacking together some codes which works great for me and solve my problem of boredom.</p>

<p>You run the code from the CLI, like so: perl &lt;perl_script.pl&gt; &lt;-l | -location&gt; &lt;-s | -search &gt;<br />
 E.g. perl search_doc.pl -l Desktop/Doc_file -s Win32::OLE</p>

<ol><li>Your perl file : search_doc.pl</li>
<li>Your location  : -l Desktop/Doc_file or -location Desktop/Doc_file</li>
<li>Your search string: -s Win32::OLE or -search Win32::OLE</li>
</ol>

<p>You can decide to use <code>--l</code> or <code>--search</code> as you want.</p>

<p>Please feel free to add comments, to ask question and use as you want.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>2teez</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/code/454868/find-a-string-in-several-files-at-a-ago</guid>
		</item>
				<item>
			<title>Changing Internet Explorer Home Page Perl Script (UPDATE)</title>
			<link>http://www.daniweb.com/software-development/perl/threads/454775/changing-internet-explorer-home-page-perl-script-update</link>
			<pubDate>Thu, 16 May 2013 20:40:41 +0000</pubDate>
			<description>Using this Perl script below, I am trying to change the homepage for the Internet Explorer browser by calling on a system fucntion. How do I call and modify the system file that contains Internet Explorer's homepage to change the url in it? *I am using the header 'use Win32::OLE.' ...</description>
			<content:encoded><![CDATA[ <p>Using this Perl script below, I am trying to change the homepage for the Internet Explorer browser by calling on a system fucntion. How do I call and modify the system file that contains Internet Explorer's homepage to change the url in it? *I am using the header 'use Win32::OLE.'</p>

<p>I had a few logical errors on my original post. This one is error-free. Thanks!</p>

<pre><code class="language-perl">#!/usr/bin/perl
use Win32::OLE;

print "What url would you like to make as Internet Explorer's home page?\n";
print "(no spaces, the url as you normally see it on the adderess bar)\n";
chomp($url=&lt;STDIN&gt;);

while (!$url)
{
    print "You did not make and entry! Please enter a url.\n";
    chomp($url=&lt;STDIN&gt;);
}

while ($url)
{
    if ($url =~ /\s/)
    {
        print "That's not a url! You entered a space somewhere. Re-enter:\n";
        chomp($url=&lt;STDIN&gt;);
    }


        *CODE TO CHANGE HOME PAGE in IE GOES HERE*


        print "\nYour home page in IE has been changed! Re-open IE and see!";
exit;
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>jg1405</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/454775/changing-internet-explorer-home-page-perl-script-update</guid>
		</item>
				<item>
			<title>Changing Internet Explorer Home Page Perl Script</title>
			<link>http://www.daniweb.com/software-development/perl/threads/454768/changing-internet-explorer-home-page-perl-script</link>
			<pubDate>Thu, 16 May 2013 19:02:35 +0000</pubDate>
			<description> Hi! I am trying to use a Perl script, as you see below, to change the home page for Internet Explorer, but I cannot come-up with the code that does the change. I am using the use Win32::OLE header to make a call to the system. This call allows the ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-perl">Hi! I am trying to use a Perl script, as you see below, to change the home page for Internet Explorer, but I cannot come-up with the code that does the change. I am using the use Win32::OLE header to make a call to the system. This call allows the modifying of the file that needs to be edited in the system I do know.
Thanks in advance!

#!/usr/bin/perl
use Win32::OLE;

print "What url would you like to make as Internet Explorer's home page?\n";
print "(no spaces, the url as you normally see it on the adderess bar)\n";
chomp($url=&lt;STDIN&gt;);

while (!$url)

    print "You did not make and entry! Please enter a url.\n";
    chomp($url=&lt;STDIN&gt;);
    exit;
}

while ($url)
{
    if ($url eq " ")
    {
        print "That's not a url! You entered a space somewhere. Re-enter:\n";
        chomp($url=&lt;STDIN&gt;);
    }
    else
    {


        *CODE TO CHANGE HOME PAGE HERE*


        print "\nYour home page in IE has been changed! Re-open IE and see!";
    }

    exit;
}
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>jg1405</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/454768/changing-internet-explorer-home-page-perl-script</guid>
		</item>
				<item>
			<title> How to use Perl2Exe</title>
			<link>http://www.daniweb.com/software-development/perl/threads/453659/-how-to-use-perl2exe</link>
			<pubDate>Tue, 30 Apr 2013 16:52:21 +0000</pubDate>
			<description>Hi I try to conver perl script script.pl to script.exe using 64 bits Perl2Exe. I put Perl2Exe to my folder C:\Perl64 I wonder if I convert right? &gt; perl perl2exe.exe myscript.pl</description>
			<content:encoded><![CDATA[ <p>Hi<br />
I try to conver perl script  script.pl to script.exe using  64 bits Perl2Exe.<br />
I put  Perl2Exe to my folder C:\Perl64</p>

<p>I wonder if  I convert right?</p>

<blockquote>
  <p>perl perl2exe.exe myscript.pl</p>
</blockquote>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>tony75</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/453659/-how-to-use-perl2exe</guid>
		</item>
				<item>
			<title>perl</title>
			<link>http://www.daniweb.com/software-development/perl/threads/453386/perl</link>
			<pubDate>Fri, 26 Apr 2013 12:54:36 +0000</pubDate>
			<description>hai, i am new to perl programming. Am writing perl script to open an generator.exe file in my system. this generator.exe file when opens asks for arguments to enter one after other how ever the sequence of arguments is always same(eg like 6,172.24.569.25,saw_200.wav,u,0,1) and i am stuck at a point ...</description>
			<content:encoded><![CDATA[ <p>hai, i am new to perl programming. Am writing perl script to open an generator.exe file in my system. this generator.exe file when opens asks for arguments to enter one after other how ever the sequence of arguments is always same(eg like 6,172.24.569.25,saw_200.wav,u,0,1) and i am stuck at a point of how to open the generator.exe file from my perl script and send the arguments to the file. please help me.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>sandeepbajjuri</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/453386/perl</guid>
		</item>
				<item>
			<title>How to Compare two columns in same file and print complete line</title>
			<link>http://www.daniweb.com/software-development/perl/threads/453365/how-to-compare-two-columns-in-same-file-and-print-complete-line</link>
			<pubDate>Fri, 26 Apr 2013 08:21:50 +0000</pubDate>
			<description> Hi Perl Experts, I'm new for perl. Thanks to give some time for my question.I have extract shared positions between two files and now I have one file like following. File is tab delimited Chr1 position QUAL GT_1 GT_2 1. chr1 478493 595 G/T G/C 2. chr1 879243 700 A/T ...</description>
			<content:encoded><![CDATA[ <pre><code class="language-perl">Hi Perl Experts,

I'm new for perl. Thanks to give some time for my question.I have extract shared positions between two files and now I have one file like following. File is tab delimited

Chr1 position  QUAL GT_1 GT_2

1. chr1 478493    595   G/T  G/C
2. chr1 879243    700   A/T  A/A
3. chr2 889922    1300  C/C  C/C
4. chr2 1926372   300   T/A  T/A 
5. chr3  237474   500   G/C  C/C
6. chr3   575757  700   A/T  A/A
7. chr3 6666874   746   T/T  T/T


and so on

I like to extract list in new file when column 4 not match with coloumn 5 then it has to print complete row in new file. Another thing I want It also to calculate how many A/T converted to AA

Expected output
chr position QUAL GT_1 GT_1
1. chr1 478493    595   G/T  G/C
2. chr1 879243    700   A/T  A/A
3. chr3  237474   500   G/C  C/C
4. chr3   575757  700   A/T  A/A

Total number A/T conveted to A/A =2
Total number G/C converted to C/C =1
</code></pre>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>yksrmc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/453365/how-to-compare-two-columns-in-same-file-and-print-complete-line</guid>
		</item>
				<item>
			<title>Using perl to activate webpage javascript post</title>
			<link>http://www.daniweb.com/software-development/perl/threads/453342/using-perl-to-activate-webpage-javascript-post</link>
			<pubDate>Thu, 25 Apr 2013 21:47:10 +0000</pubDate>
			<description>Hi, i'm trying to write a small script for the website &quot;www.fanfiction.net.&quot; This small perl script is part of a much larger script, which is why it has to be in Perl. When you are logged in and go to any of the stories on the site there is a ...</description>
			<content:encoded><![CDATA[ <p>Hi, i'm trying to write a small script for the website "www.fanfiction.net." This small perl script is part of a much larger script, which is why it has to be in Perl.</p>

<p>When you are logged in and go to any of the stories on the site there is a button that is marked a follow/fav. This button brinks up a javascript based popup with check boxes that is then submitted to the server.</p>

<p>I am able to get the script to download the pages source code, and use regex to pull out what i need. The question is, is there a way to get perl to automatically submit the post command to the server only given the source code of the webpage.</p>

<p>Thanks for any help.</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>anglaissam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/453342/using-perl-to-activate-webpage-javascript-post</guid>
		</item>
				<item>
			<title>How to to parse html files </title>
			<link>http://www.daniweb.com/software-development/perl/threads/453115/how-to-to-parse-html-files-</link>
			<pubDate>Tue, 23 Apr 2013 12:22:46 +0000</pubDate>
			<description>Hi How can I parse html files for example daniweb.com 1.Extract all the links pointed (the content of the href tag) 2. how can I List all of them after having removed the duplicates (means that there is two links pointed the same page, only one should be displayed) I ...</description>
			<content:encoded><![CDATA[ <p>Hi<br />
How can I parse html files for example daniweb.com<br />
1.Extract all the links pointed (the content of the href tag)</p>

<ol><li>how can I List all of them after having removed the duplicates (means that there is two links pointed the same page, only one should be displayed) </li>
</ol>

<p>I shall be very thankful for din help</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>tony75</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/453115/how-to-to-parse-html-files-</guid>
		</item>
				<item>
			<title>Read and sort all files in a directory</title>
			<link>http://www.daniweb.com/software-development/perl/threads/452917/read-and-sort-all-files-in-a-directory</link>
			<pubDate>Sat, 20 Apr 2013 14:38:43 +0000</pubDate>
			<description>Hi I have 4 files in directory on my desktop? My question is 1.How can I display for each file only the name, the size and the date in this order? 2. How can I display all files sorted accorded their name? #!/usr/bin/perl use strict; use warnings; my $dir = ...</description>
			<content:encoded><![CDATA[ <p>Hi<br />
I have 4 files in directory  on my desktop?<br />
My question is</p>

<p>1.How can I display for each file only the name, the size and the date in this order?<br />
2. How can I display all files sorted accorded their name?</p>

<pre><code class="language-perl">#!/usr/bin/perl
use strict;
use warnings;

my $dir = 'C:\Users\bt\Desktop\perl_files';

opendir(DIR, $dir) or die $!;
my @files = sort { $a &lt;=&gt; $b } readdir(DIR);
while (my $file = readdir(DIR)) {

    # Use a regular expression to ignore files beginning with a period
    next if ($file =~ m/^\./);

    print "$file\n";

}

closedir(DIR);
exit 0;
</code></pre>

<p>But i get error?</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>tony75</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/452917/read-and-sort-all-files-in-a-directory</guid>
		</item>
				<item>
			<title>Want to take out the above 31 characters objects</title>
			<link>http://www.daniweb.com/software-development/perl/threads/450874/want-to-take-out-the-above-31-characters-objects</link>
			<pubDate>Sun, 24 Mar 2013 17:56:48 +0000</pubDate>
			<description>Hi, I am trying to write perl script which take out the 31 characters objects from the html page. Please help me. Regards, Hero</description>
			<content:encoded><![CDATA[ <p>Hi,</p>

<p>I am trying to write perl script which take out the 31 characters objects from the html page.</p>

<p>Please help me.</p>

<p>Regards,<br />
Hero</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>hero19760</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/450874/want-to-take-out-the-above-31-characters-objects</guid>
		</item>
				<item>
			<title>Compare two txt files &amp; output in third file in Perl with html Dual screen</title>
			<link>http://www.daniweb.com/software-development/perl/threads/450872/compare-two-txt-files-output-in-third-file-in-perl-with-html-dual-screen</link>
			<pubDate>Sun, 24 Mar 2013 17:51:27 +0000</pubDate>
			<description>Hi All, Trying to script by comparing the two .txt file and getting the output in html page which should show the comparision in html with dual screen. Can you please help me Regards, Hero</description>
			<content:encoded><![CDATA[ <p>Hi All,</p>

<p>Trying to script by comparing the two .txt file and getting the output in html page which should show the comparision in html with dual screen.</p>

<p>Can you please help me</p>

<p>Regards,<br />
Hero</p>
 ]]></content:encoded>
			<category domain="http://www.daniweb.com/software-development/perl/112">Perl</category>
			<dc:creator>hero19760</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/software-development/perl/threads/450872/compare-two-txt-files-output-in-third-file-in-perl-with-html-dual-screen</guid>
		</item>
			</channel>
</rss>