473,554 Members | 3,084 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.
4
9,753
thread by: Dipesh Mehta | last post Jul 19 '05 by: Gunnar Hjalmarsson
Can anybody help me regarding how to open a new browser window with my specification from within perl script for new output? NB: I can do this easily with javascript. Thanks in advance.
12
9,751
thread by: lilly07 | last post Feb 4 '09 by: KevinADC
Hi I have two text files and each file contains 2 tab separated strings as below: File R.txt class1 12345 class2 26789 class1 4567
2
9,743
thread by: sherihan2007 | last post Nov 19 '07 by: Balthes
Hi while am running perl script which parses an XML file in AIX following error is getting:(i have given use XML::parser in the script) Can't load '/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: 05 09-022 Cannot load module...
0
9,735
thread by: Kirt Loki Dankmyer | last post Nov 22 '05 by: Kirt Loki Dankmyer
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile. I need it to be compiled with threads. Anyone have any wisdom on how best to do this? Here's a transcript of my latest attempt. It's long; you...
2
9,733
thread by: Mersilla | last post Aug 1 '07 by: KevinADC
Dear All, I am currently new to perl and is experiencing difficulties with splitting and array with multiple conditions. For example , I would like to spilt an element, which contains one or more of the three keywords that i would like to split the array into : Region, Site, Bond. i tried the command @split_feature_protein_field =...
8
9,724
thread by: MMak12 | last post 1 Week Ago by: anhd389
I am trying to generate pivot table in excel using perl which brings data from MSAccess .If some body has done this before can you please help me.
6
9,650
thread by: Studentmadhura05 | last post Feb 21 '07 by: docsnyder
I am trying to save the intermediate result in an array which I am accessing in every loop of a while loop. Following is the part of the code: my @array_mac=(); my $index1=0; $array_mac_sz=@array_mac; $index1=0; #print "$array_mac_sz\n"; if ($array_mac_sz > 0){
6
9,598
KevinADC
thread by: KevinADC | last post Mar 31 '10 by: chaarmann
This snippet of code provides several examples of programming techniques that can be applied to most programs. using hashes to create unique results static variable recursive function serialization The code itself generates a list of strings comprised of random numbers. No number will be repeated within a string, and no string will...
1
9,578
thread by: Joe | last post Jul 19 '05 by: Jim Gibson
I am trying to write a Perlscript to be used with some HTML pages. Here is how it works: 1.. The first HTML page has a form which requests for user input. Then it passes the QUERY_STRING to a Perl script. 2.. The Perl script will then validate the data. If input validation fails, it returns to the previous screen and asks the user to...
2
9,567
thread by: Julie Warden | last post Apr 21 '06 by: Julie Warden
Group, I'm setting up Perl 5.8 on a Sun solaris 5.6 machine and have a question about the $PATH variable. My installation is in /usr/local with subdirs: perl is in bin libraries are in lib/perl5 lib/perl5 has 4 subdirs and these have subdirs, and some of these have
2
9,530
thread by: Eric McDaniel | last post Jul 19 '05 by: Joseph Brenner
I am trying to read in a bunch of images and manipulate them using Image::Magick, then display them using Tk::Photo. I would like to do this without creating a temp file for each image, since there can be quite a few of them. However, I can't make Tk::Photo understand the data returned by Image::Magick's ImageToBlob() function. Here is the...
12
9,500
thread by: Vallabh | last post Oct 8 '08 by: KevinADC
I want to create a separate log that includes an I (logIN) , userid, and date/timestamp from a detailed log. This type of data compresses very well so I can store years of it. I need script to create an separate log files that can saved on each server. Since I dont know much about perl scripting. Your help will be appreciated. Thanx Val
2
9,478
thread by: Pierre | last post Nov 22 '05 by: Lars Kellogg-Stedman
Hello, I would like to write a regexp that can be either case sensitive or that can ignore the case based on a variable (value would be either 'i' or ''). For instance in the below code the variable is $case. I can't make that piece of code working fine. Anyone can help please ? my $str = "Hello World!"; my $pattern "hello"; my $case =...
1
9,475
thread by: KaXo | last post Jul 19 '05 by: Jim Gibson
$r_socket = IO::Socket::INET->new( PeerAddr => "10.0.26.78", PeerPort => 17990, Proto => 'tcp', Timeout => 1 ); ...................... if ($r_socket && $r_socket->connected()) { close($r_socket); }
8
9,474
thread by: Mangala Amargol | last post Jun 10 '11 by: RonB
For example,runnig "ipconfig" command through perl script and printing it on web browser. my $cmd = "ipconfig"; my $output = `$cmd`; print $output; Above code works fine in Windows Server 2003,but $output is null in Windows Server 2008 R2. Done necessary settings in IIS for perl,is there additional settings in windows server 2008 R2...
7
9,471
thread by: dillipkumar | last post Sep 24 '08 by: nithinpes
Hi, Can anybody tell me how to read an excel file. I have written a script, it is not working with multi sheets. And also i want to print all workshet present in the excel file. use Spreadsheet::ParseExcel::Simple; use strict;
3
9,445
thread by: anklos | last post Oct 8 '08 by: KevinADC
Hi, everyone I met a "Bad file descriptor" problem, and I test my var, it is right in the proceeding. I dont know why, any suggestion is helpful $dir = "d:/1"; #print "Text files in $dir are:\n"; opendir(HANDLE, $dir) or die "Can't open $dir: $!"; while( defined ($file = readdir HANDLE) ) { next if $file =~ /^\./;
6
9,438
thread by: johntology | last post Oct 10 '11 by: sakurakun
Hello, I'm having a tough time using chdir in different versions of perl in a dos window (XP). In early versions of Perl 5.x it works just fine. I have a bat file that dynamically sets my perl path to either 5.0.x or to 5.8.8: path %path%;c:\perl\ Then in I call the perl script which just has this:
7
9,421
thread by: rayken15 | last post Jul 17 '07 by: rayken15
I'm working to add a simple GUI form to an already existing perl script. The script simply takes a part number and an output path. It then connects to a client application and downloads data to the output directory. This part works great. However, to improve the ease of use I want to invoke the Windows Browse Folder Dialog for the user to select...
4
9,420
thread by: suruchimathur | last post Feb 23 '07 by: miller
Hi, I need to write a perl script to browse a certain site, login and click on a link. The URL for the link changes daily and uses session ID as well but the text remains the same on the HTML page. Can anyone let me know which PERL module I could use for this?
1
9,397
thread by: Sean | last post Jul 19 '05 by: Gunnar Hjalmarsson
I know "eval" and "if ($@)" is the equivalent of a try/catch in the C programming world. My question is how to basically throw an error in one perl script that can be caught by another? For example: ScriptA.pl: ----------- typical perl code but when we are done, do we exit, die, or warn so that ScriptB.pl can pick it up? EX: ScriptB.pl
8
9,395
thread by: Perl Beginner | last post Mar 3 '08 by: Perl Beginner
I am using Win32. I have created an excel spreadsheet, formatted the columns and rows, and would like to write to the cells…all of this using Spreadsheet::WriteExcel. My issue is, my script is very vast with a lot of subroutines, but I need the excel spreadsheet created in the main subroutine becasue this is where the data is that i want to...
7
9,389
thread by: deppeler | last post Jul 28 '07 by: KevinADC
How do I sort the contents of a flat file based on the second field? What I have now sorts by the first field - 0 open (BASE, $dbk) || do {&no_open;}; @sorted = sort(<BASE>); foreach $pair (@sorted) { @show = split(/,/, $pair); close(BASE);
5
9,346
thread by: ronenbenchamo | last post May 17 '07 by: AdrianH
Hi All, I would like to run a batch file from perl and ger the reutun value from the batch file, How can I do it? I try to run system or exec but it didn’t work Any idea? $val=system("test.bat");
5
9,324
thread by: avashisht | last post Jul 19 '05 by: Joe Smith
Hi, I am veeeery new to perl.. i have a script where i am outputting the Environment variable to a HASH. either i want to output hash values into a text file, Or get hash into an array and then print the array into the text file../ thanks avashisht

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.