1,633 Topics

Member Avatar for
Member Avatar for KevinADC
Member Avatar for nicetapo

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 "s/'cat/dog/cat'/'cat/tiger/deer'/g" sample.txt but it didn't work.

Member Avatar for nicetapo
0
212
Member Avatar for magaji ahmed

I want a perl parser for relational algebra expression, can anybody help me with a code for that.

Member Avatar for magaji ahmed
0
136
Member Avatar for jg1405

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.' …

Member Avatar for doubi
0
312
Member Avatar for anglaissam

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. When you are logged in and go to any of the stories on the site there is a …

Member Avatar for doubi
0
201
Member Avatar for jg1405

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 …

Member Avatar for doubi
0
319
Member Avatar for 2teez

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 …

Member Avatar for rsprice
0
241
Member Avatar for rajesrmbioinfo

i was trying to create csv file by appending variables using print function what's wrong with this code why this prints ","."$j" to a new line **code is here - ** while( $i < 1000 ){ $j = 1; while( $mean_data_sorted[$i] == $mean_data_sorted[$i+1] ){ $i++; $j++; } open( nofile, '>>', …

Member Avatar for 2teez
0
167
Member Avatar for yksrmc

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 …

Member Avatar for yksrmc
0
1K
Member Avatar for tony75

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? > perl perl2exe.exe myscript.pl

Member Avatar for tony75
0
213
Member Avatar for tony75

Hi Im installing eclipse and I would like run perl but I got this error message “Missing Perl interprete” anyone know how can I fix it? http://ubuntuone.com/7BVJr5y84ApsitTZSldele

Member Avatar for tony75
0
250
Member Avatar for sandeepbajjuri

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 …

Member Avatar for 2teez
0
183
Member Avatar for tony75

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 …

Member Avatar for tony75
0
285
Member Avatar for tony75

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 = …

Member Avatar for tony75
0
4K
Member Avatar for typomaniac101

I have searched tutorials, etc., on the subject of using flock but it seems like nothing gives a straight answer. I have a script for a guestbook which will allow users to upload photos. Everything goes to a MySQL database with the exception of the image which will go into …

Member Avatar for semontuffel
0
160
Member Avatar for blenkhn

I have built a private intranet using perl and have upgrading the site to IIS 7.5 on Windows Server 2008 R2. I have a section that prints tags formatted with win32 Printer. I have gone through all the steps to get perl to work. I was able to get this …

Member Avatar for LastMitch
0
761
Member Avatar for hero19760

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

Member Avatar for 2teez
0
224
Member Avatar for hero19760

Hi, I am trying to write perl script which take out the 31 characters objects from the html page. Please help me. Regards, Hero

Member Avatar for 2teez
0
57
Member Avatar for rajesh9042

Hi, I am trying to download files using Net::FTP perl module. I am facing problem with downloaded files not able to place in there respective folders. Please need help, I am providing the code below #!/usr/bin/perl use Net::FTP; use File::Copy; $ftp = Net::FTP->new("ftp.ncbi.nlm.nih.gov", Debug => 0) or die "Cannot connect …

Member Avatar for DoRight
0
288
Member Avatar for cacofonix

Hi All, In my script, i am trying to call multiple fork call. if i call less than 10 times, its working fine. If i call more than 20 or 30 times, most of the process getting time out or died foreach my $ttyport (@processTTY) { my $pid = fork();Inline …

Member Avatar for coding101
0
143
Member Avatar for tony75

Hi Any idea how to solve an old exercice? The linux command ls -alR produce informations about files contained in the current directory and its subdirectories. You can save its output by using redirections (in the file output in the following example): ls -alr > output The exercice is to …

Member Avatar for 2teez
0
254
Member Avatar for Bhavya scripted

perl vs ruby. what is the difference in speed/popularity and performance? thanks

Member Avatar for Neuronimbus1
0
145
Member Avatar for tony75

Hi I try to Search for xp_cmdshell string in log.txt file but i got error? my $file = "c:/logdata.txt"; open (IN,$file) or die "Can't read $file: $!"; my $tag = "xp_cmdshell"; open(IN,"<",$file) || die "could not open $file: $!\n"; while (<IN>) { if (grep(/$tag/,$_)) { #Do something } } Close(file);

Member Avatar for tony75
0
207
Member Avatar for vivek.vivek

Hi, I need to print lines if it appears more than 3 times in a file looking only at the second column. I have written the below code. But it will look for the complete words in a line. #!/usr/bin/perl use strict; use warnings; my $file = 'file.txt'; my %seen …

Member Avatar for 2teez
0
192
Member Avatar for sureshspeaks

Hi im an infant in perl scripting, Can any body help me in writing the code snippet for my need to parse xml file. i have an xml file which will have tag x,y,z repeating with different values through out the xml start and end tag, i need these different …

Member Avatar for DoRight
0
355
Member Avatar for Arash-Sh

Hello im new on perl and i want to start my first project with this programming language. i want to pick one of this topics to start and exprienceing the coding . DNS functions or Small Chat server . before i read books and watch some tut movies and learn …

Member Avatar for DoRight
0
100
Member Avatar for FelineHazard

Hi Guys, I am writing a Perl script that needs to initiate various http (or https) requests. Before doing so, I would like first to verify that a given string is indeed a valid URL address. I would like to do so (preferably) **without** using regexp. Reason being, that URLs …

Member Avatar for FelineHazard
0
716
Member Avatar for arishy

Wish you all exciting 2013!!!. My current script does the following 1. login to my secured Bank Account 2. download current statement and logout 3. do some reporting on the webpage (html) 4. send the report via email to myself Here what I need your help and direction( anything with …

Member Avatar for DoRight
0
207
Member Avatar for RingmasterTJ

Hi All, I'm a bit of a noobie to Perl, & am working on porting a Perl based web app from an old Sun box to a virtually hosted Windows box. The Windows box is (as far as I know) 2008R1 & running IIS 7.0, the version of Perl is …

Member Avatar for voidyman
0
246
Member Avatar for voidyman

Below code snippet when executed from within a perl script, gives only $datetime."12/31/9999,AUTO,.$datetime as ouput. my $datetime=`date "+%D %r"`; open(FIN,"<$file_in") or die $!."\n"; open(FOUT,">$file_out") or die $!."\n"; my @lines=<FIN>; close(FIN); foreach(@lines){ $msg=$_; chomp($msg); $msg=$msg.",".$datetime.",12/31/9999,AUTO,".$datetime; print FOUT $msg."\n"; } close(FOUT); If i remove the chomp though, it gives me the line …

Member Avatar for voidyman
0
133

The End.