473,609 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl Forum

Perl programming language - ask questions about perl programming, syntax, variables, scoping, constructs, operators and functions, files, I/O, regular expressions, regex, subroutines, OO (object oriented), perl modules, CGI and more.
8
2,841
blackgoat
thread by: blackgoat | last post Mar 9 '10 by: RonB
I have to run a command in unix. And I have to match this expression from whatever output I get. I tried doing the following: my $var = 'command'; my ($exp) = $var =~ m/pattern/; The same is followed by a html script in which the value of $exp must appear. But I am unable to do so... Can u pls help! what is the best way to do this?? ...
3
3,570
thread by: appu123 | last post Mar 9 '10 by: appu123
How Can I copy Multiple Excel Worksheets into a single Workbook using perl. I was using File::Copy but it over writes data.
1
3,015
thread by: sree ram | last post Mar 8 '10 by: jkmyoung
code for getting maximum rows in excel sheet using perl script
0
1,904
thread by: appu123 | last post Mar 8 '10 by: appu123
How can we copy multiple Excel Sheets into a new Workbook. I was trying to copy using File::Copy, but it does not help as it overwrites the existing details
2
2,883
thread by: appu123 | last post Mar 8 '10 by: appu123
does perl allow the download of excel files i.e. in xls or csv format ???
0
1,299
blackgoat
thread by: blackgoat | last post Mar 8 '10 by: blackgoat
Hi! I have some data stored in text form which appears in the following format: mon_jan_01_16:00:33_t23.96-d568 A number of such entries are present in my file. I need to pick out(thru regexp)the entry that is most recent. I, however, fail to understand how can the date and time functions be used in this case. Pls help me out... ...
0
1,305
thread by: commodorejim | last post Mar 6 '10 by: commodorejim
Hi everyone, I've recently started experimenting with PERL in the area of sockets and networks. I've gotten the two programs listed below working on my own machine (through localhost). However, I want to prompt the server to ask the client for a password, printing a message if the correct password is entered or not. The problem I'm...
3
1,836
thread by: rasmidas | last post Mar 5 '10 by: jkmyoung
Hi, I have a perl script resides in my unix serve. I want to call that from inside a web-page. Please let me know, how can i make it possible?
2
1,337
blackgoat
thread by: blackgoat | last post Mar 4 '10 by: blackgoat
Hi! Pls help! My code is not working! Pls tell me whats wrong with it... it returns value 1 in all cases!! %dbase = { apple => "fruit", brinjal => "vegetable" , coffee => "beverage", };
1
1,935
thread by: sha37 | last post Mar 3 '10 by: RonB
Hi, I have a below subroutine called getqueryresults() The below function just takes the data from ABC table and returns one row. This function exists in db.pl file sub getqueryresults() { my $followerName = $_; my $sql = "SELECT * ABC WHERE (delay is null or delay < sysdate) AND id = ? ORDER BY qcounter,...
0
1,475
thread by: adameurich | last post Mar 3 '10 by: adameurich
I have a perl program that is acting as a TCP/IP server using IO::Socket::INET. I want to know how I can get the IP address of the client who connects to my program. Any way to find that out? Thanks in advance, Adam Eurich
7
2,686
thread by: sammak168 | last post Mar 2 '10 by: RonB
I had a Perl script that called a sql file calling the stored procedure in Oracle database. The stored procedure ran for a long time (more than 1.5 hrs) and did not return the result code to the perl script. (I could see from the job log of the stored procedure that the stored procedure was successfully completed) my $sql = "sqlplus -s...
3
1,451
thread by: Divakar109 | last post Mar 2 '10 by: RonB
This is my code for passing values from HTML to perl ,my cgi-lib.pl and perl scripts are in cgi-bin folder but I am getting http 500 internal server error whilre executing plz help. #!C:\Perl\bin require "cgi-lib.pl"; &ReadParse(*input); print "Content-Type: text/html\n\n"; print "<html> <head>\n"; print "<title>User Name</title>\n";
1
8,254
thread by: Ormazd | last post Mar 2 '10 by: Ormazd
Hello, I was wondering if anyone might be able to help me with a little PERL script? I'm very new and I have been given a task to write a simple Perl script that prints out the file names and file sizes and determines the average file size from the directory listing found in the "files.txt" file. In other words, I need to add up the size of...
1
1,466
thread by: Divakar109 | last post Feb 26 '10 by: eWish
How to pass parameters or values from HTML page to a perl/cgi script.My requirement is my front page is HTML where a user enters 2 numbers to be added and clicks submit these 2 numbers entered must be given to the perl/cgi script which does the addition and the given back the value to front end HTML page where the output is displayed.
2
2,413
thread by: sha37 | last post Feb 25 '10 by: sha37
Hi, I have to code this part in perl and using DBI. 1. I have a SQL select query which fetches some rows based on order. 2. I have to fetch each row at a time, once i fetch the first row i process the fields and some response is returned. 3. now I have to fetch the next row again and do the step 2. This whole process should be in a...
3
1,245
thread by: alron | last post Feb 24 '10 by: jkmyoung
There are 2 files (A.txt,b.txt) A.txt has 4 columns seperated by tabs B.txt has only one column My job is to find multi-word tags (i.e. tags that are more than one word) in A.txt, if a tag matches a tag in B.txt, print the tag ) from the file A.txt i know i need to use hashes but cannot understand how.....can smeone explain
0
1,341
thread by: pariksh1t | last post Feb 24 '10 by: pariksh1t
HI I am trying to install sybperl on windows xp . I have install strawberry perl. i did the following task to install sybperl i downloaded the sybperl-2.18.tar from CPAN and extracted it to c:\sybperl-2.18 then i went inside c:\sybperl-2.18 then issued this command perl Makefile.PL dmake this gave me error
1
2,893
thread by: gpx01 | last post Feb 23 '10 by: numberwhun
IO::Tty is a pre-req for expect.pm IO::Tty install reports that "Configuration looks good!" (See below) but the makefile fails with missing Tty.so Any suggestions? ------------------ # perl Makefile.PL Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)...
2
2,316
thread by: powerfulperl | last post Feb 21 '10 by: powerfulperl
Hi, I want to properly format the output of the df command and store the output in the array, the problem here is, in the third line if u guyz c when the location file system path extends the size, %, mounted on.. goes to next line when i try to push the values in the array line by line i want this to appear in one line.. any help is much...
3
1,926
thread by: ulnanewbie | last post Feb 19 '10 by: numberwhun
Can some one help me to understand the below perl code line: 1. my @myarray; 2. $myarray {testscore} =0; 3. $myarray {testgrade} = "none"; I understand the code line #1, it is basically declaring the array.
6
2,514
thread by: mnew | last post Feb 18 '10 by: mnew
Hi, i have just started using Perl and I'm trying to expand a perl variable within a Unix command in the perl script, for example: - foreach $host (@lines) { print "$host\n"; $sshcmd = "ssh"; $get = `$sshcmd $host "uptime"`; print "$get\n";
3
1,521
blackgoat
thread by: blackgoat | last post Feb 17 '10 by: numberwhun
Hi! If a paragraph needs to be teaversed to find all occurances of words ending with a certain pattern(eg *ing), then which will be a better option to use and why? index() or pos(). Thanks BG
0
1,619
thread by: manimarank | last post Feb 15 '10 by: manimarank
I have written a perl script which inturn calls or runs few perl modules. My requirement is to use run the perl script with different switches or arguments and asses the code coverage of both perl script and perl modules. I am using Devel::Cover module to collect metrics, but it collects only for the given perl script not for modules. Does...
4
3,771
thread by: Polarism | last post Feb 12 '10 by: vasundhar
Hello, I am very new to perl and I am having trouble figuring out how to replace multiple strings in a single file. The file has something around 750k instances that need to be replaced with 350 different values: 1-A needs to be replaced with 12-FOO-1-A 2-B needs to be replaced with 44-BAR-2-B 1-400 needs to be replaced with 123-D1-400...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.