1,633 Topics
| |
I have numerous amounts of .ini files that I have to extract specific lines from. Say Lines 1,5,9,23,63,31 (each in a new line) from all files. So as you can see, no sort of pattern and I jump around in lines. I'd like to write a perl script (which I … | |
I would like my C program to run my perl script: I have something like this in mind: system("C:\test\perl\a.pl"); But obviously it needs to do perl a.pl. Not just execute the a.pl. Any ideas? Something simple would be appreciated. | |
Hey guys, quick question, I'm a beginner and put together a grep script that searches for certain content within text files in a directory. The result yields over 600 lines so i want to put them in a file called file.txt. [CODE]opendir (DIR, ".") or die "$!"; my @files = … | |
Hi, I am trying to get to use the grep function in perl, I have been searching web pages but can't get a simple example. I am reading in a .csv file with 7 columns and loads of rows, this is done with: [code] $dat_file = 'sample.csv'; [/code] In the … | |
HI can anyone tell me how to start with a project to read pattern files in perl...I am really confused... | |
Hi everyone I want to know what is __END__ mean , is this the end of the file. For what this is used in PERL? Thanks | |
Hi friends, i want to make a gui using perl qt, any one have any useful links plz send me. faithfully | |
i have 10 data notepad files (with column x= 1 to 5 and column y = some random number) x y 1 12 2 13 3 8 4 6 5 2 i want to multiply the 1st file's second column with 3, and save it as new data file Increase … | |
hey guys my while loop is not working correctly..doesnt matter which character i enter it will still run the loop..and what it should do is test to see if character entered is 'y'(well thats what i want it to do ) thanks!! [CODE]#! /usr/bin/perl $exp = "y"; while ($exp =="y") … | |
I'm sending a post to an url, and after successfully sending the post, it will turn to another page, now how to find the another page url? <code=perl> #!/usr/bin/perl use LWP 5.64; my %form; $form{"name"} = $name; $form{"email"} = $email; $form{"grade"} = $grade; my $res; my $url = "http://www.mydomain.com/register.php"; SIG{ALRM} … | |
Hello, I am very much new to perl and to this forum also... pls help for this prob... I have 200 two colom data files like, xyz_channel_1.dat .....xyz_channel_200.dat. Coloms of each file is similer like below; First colom 'X' starts from 1 and ends at 200. and second colom 'Y' … | |
Hi all, I was wondering if any of you have had any experience with Catalyst and Moose. I am starting a project that I think would use both. I plan to use mod_perl or fast_cgi with Catalyst as the framework and Mason as the template language (I have used Mason … | |
is it possible to open and work in two files from same or different location simultaneously. How it is possible? Please suggest Thanks / Regards Mahesh | |
Dear Daniweb Community, Like I've previously explained on an other topic, I'm trying to delete lines of a csv file where the value of a column is equal to a fixed value. In other words I have to check if a specific column value for a line is equal to … | |
Hi....I am very new in perl and maybe My question can be very simple...I created hash of hash and I filled it.. But I cannot access any element of it...This is a part of my code;; %doclen=($putword=>{id => $words[2]}); Can somebody write any sentensize to access any element of ths … | |
Hi all, I'm very new to perl but I will try to explain where I am at the moment. I have a lot of information in a .csv file. The 2nd columb has different values relating to different things. For example "no" = nokia, "se" = sony ericsson, "ip" = … | |
Thanks for reading my post. I just started perl programming. I need to print the prime factors on the screen. but when I executed my code, it shows nothing. I dont know what else to do. This is the code I got... [CODE] # number to factor is passed as … | |
hi just wanna ask is it possible for perl to get the value of a print command? for ex. my $result = print "hello world\n"; print "$result\n"; why is it that the "print $result" would print a value which is 1?.. is it possible to get the result "hello world" … | |
I just upgraded my server and now a simple log script reaks of errors. [code]#!/usr/bin/perl use CGI ':standard'; use warnings; $database = "/full_path/filename.shtml"; $shortdate = `date +"%D %T %Z"`; chop ($shortdate); open (DATABASE,">>$database"); print DATABASE "$ENV{'REMOTE_ADDR'} - $shortdate - $ENV{'SCRIPT_URI'} - $ENV{'HTTP_USER_AGENT'}<!-- - $ENV{'HTTP_REFERER'}--><BR>\n"; close(DATABASE); { print "Content-Type: text/html\n\n"; print … | |
We have this scripting working on one server and are trying to transfer it to a different server and we are getting this error the working server is fedora fc7 the new on is fedora fc12. When we run the script from a command line we get: web root 23:42:09 … | |
If i fork off a parent and want to fork of fthe child, can i pass new variables from the child to the "grand -child"? PL help me clear this concept. | |
I wasnt to fork from a parent and execute two perl codes simultaneously rot13.pl and pi.pl.I want to keep track of the pid's of both children. i am not aware how to do it within the system() cmd. I have written the code below. But something tells me I'm being … | |
Hello everyone, I'm currently working on an automated process which extract user info from AD with csvde, then do some treatments with perl scripts, convert the csv file into xls in order to do some modifications by a specific user in Excel, then convert the xls to csv, format it … | |
Hi, I have a file.txt, I need to enter the data in string. Currently my code looks like this, [CODE]#!/usr/bin/perl open myfiles, "file.txt" or die "couldn't find file: $!"; while (<myfiles>){ $string .= $_; } print $string; close(myfiles);[/CODE] The output when I print the string is like hello.c work.c office.c … | |
Hi gusy, Can any one suggest , how to install DBD::mysql on windows mechine. (Its eating my head). I tried all the possible ways , but its not installing. 1) I tried to install directly from cpan , failed 2) manually downloaded, and tried to install, still failing : showing … | |
I am trying to learn CGI programming in PERL. I have a simple test page that I want to try out, but when I upload it and try to display it as a web page, all I get is the source code. Can anyone help me out? I'm not sure … | |
cant get this to display on webpage. Apache is setup correctly. Getting error "[COLOR="Green"]malformed header from script. Bad header=04/19/2010: date.pl[/COLOR]" where am i going wrong? [CODE]#!/usr/bin/perl use strict; use warnings; use POSIX qw(strftime); my $cur_time = strftime "%a %b %e %H:%M:%S %Y", localtime; print "$cur_time\n"; open PS, "/bin/netstat -nra 2>&1|" … | |
| |
I need to compare columns widths and data types in a txt file using a template. Here is a bit of code that I have been working on, just need some help doing the comparisons using unpack. - perlnewbe... #!/usr/local/bin/perl use strict; use warnings; my $foo = (); my @bar … | |
hi all, i've a file named "a.config" with the line "CLUSTER_NAME[\t][\t]cluster1" by [\t] i mean tabs. now i need to change the value cluster1 to someother value, say autocluster. The code which i wrote was : [CODE]cat a.config | sed 's/CLUSTER_NAME[\t][\t] [A-Za-z0-9]*/CLUSTER_NAME[\t][\t]autocluster/' > a.config.temp[/CODE] [CODE]mv a.config.temp a.config[/CODE] but this doesn … |
The End.