1,633 Topics
|
|
This is a routine task best done with two regexp's when using perl. |
|
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. |
|
I want a perl parser for relational algebra expression, can anybody help me with a code for that. |
|
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.' … |
|
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 … |
|
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 … |
|
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 … |
|
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, '>>', … |
|
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 … |
|
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 |
|
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 |
|
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 … |
|
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 … |
|
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 = … |
|
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 … |
|
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 … |
|
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 |
|
Hi, I am trying to write perl script which take out the 31 characters objects from the html page. Please help me. Regards, Hero |
|
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 … |
|
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 … |
|
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 … |
|
perl vs ruby. what is the difference in speed/popularity and performance? thanks |
|
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); |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.