473,606 Members | 2,453 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.
1
1,528
thread by: Hugh Lutley | last post Jul 19 '05 by: nobull
I'm writing a script that sends messages via the serial port at the moment. I'm really quite hopeless at Perl so I need a little help. Perl is great at handling strings but I'm having trouble finding accurate info on how to specify a 4 bit hex value. I've basically gotta send two 4bit chunks of data and a whole host of 8 bit chunks. ...
1
3,946
thread by: Carl Ogawa | last post Jul 19 '05 by: nobull
The following will stop to open test.pl due to using param('userid') and param('pwd'). Is there an alternative way to get data from HTML file to CGI file? I have to do this in the particular situation. -------- html file --------- <form name = "form3" action = "http://localhost/scripts/test.pl" method = post> Name: <INPUT TYPE = text NAME =...
1
2,592
thread by: Carl Ogawa | last post Jul 19 '05 by: nobull
How do I make .cgi extention work? I installed ActivePerl 5.8. My CGI scripts work fine with .PL extention but not .CGI extention although I associated CGI extention as exactly same as PL extention in WinXP Prof . Where else should I change to make it work?
1
1,828
thread by: Rusty | last post Jul 19 '05 by: Gunnar Hjalmarsson
Greetings, My problem is I need to call a subroutine but the number of args can be many and vary from call to call. What I'm trying to do is parse a template and capture the data from the template into a scalar and then call the subroutine with the scalar value and have perl substitute the scalar with the data in the scalar and have that...
2
2,464
thread by: Zaxil | last post Jul 19 '05 by: Leif K-Brooks
when I create a menu in a dynamic document using cgi.pm how do I get the menu to submit after someone makes a choice? I cant tell if theres something special I have to do or if there is an error in how I've done my code. Thanks everyone, Christopher
0
2,253
thread by: krigare | last post Jul 19 '05 by: krigare
Here is what I get: gcc -L/usr/local/lib -o miniperl \ miniperlmain.o opmini.o libperl.a -lsocket -lnsl -ldl -lm -lc ld: fatal: file miniperlmain.o: wrong ELF class: ELFCLASS64 ld: fatal: File processing errors. No output written to miniperl collect2: ld returned 1 exit status make: *** Error 1 and ld -help shows ELF64_sparc support but...
0
1,300
thread by: Antonio Gulli | last post Jul 19 '05 by: Antonio Gulli
I have a large list of DB_Files stored in a directory. I would like to tie all of them to an array of hashes and to search them for key, using the hashes. My idea is rather simple: my (@listOfHashes); my ($numOfHashes); sub loadDBs{
4
3,405
thread by: ivo welch | last post Jul 19 '05 by: ivo welch
I know regex can't do this, so may I ask what the recommended procedure is for extracting a bracketed TeX argument, which itself can contain other bracketed TeX arguments? $string = " text \sometexmacro{arg1}{this is a second {\bf arg} argument} more text"; and file.pm has a sub that makes it easy to describe all the arguments to...
0
2,256
thread by: SRB | last post Jul 19 '05 by: SRB
I get invalid top directory at E:/Perl/lib/File/Find.pm line 562. when i run this in windows. Can someone explain what I am doing wrong? use File::Find; use Win32::File; use Win32API::File 0.08 qw( :ALL ); my $LogDir = "C:\\"; print $LogDir;
7
5,183
thread by: mikester | last post Jul 19 '05 by: mikester
First off I'll say - I am a bad perl programmer. I want to be better and with your help I'll get there and then be able to contribute more here. That being said, I have a simple problem compounded by file size. I have a PIX that logs to my syslog server for a ton of items - my logs sizes get extremely large; ~13 GIGABYTEs daily and they...
1
4,729
thread by: RB | last post Jul 19 '05 by: Daniel Berger
Does anyone know how to monitor the existance of a process running in windows task manager. Basically I want to start another process only if the previous has finished and the script runs in windows. Thanks
0
1,473
thread by: nus | last post Jul 19 '05 by: nus
Hi, I'm wondering if object-oriented perl is a must-use if say you're going to code a pretty large program. I've used perl for almost a year but have written large plain perl code. I try to organise my code by putting related subs in different modules and have the main script call those subs. In that way, I'm able to reuse some of the...
0
1,529
thread by: Roy | last post Jul 19 '05 by: Roy
Hi, Im looking for a script that checks the status of some remote servers (ftp/web and userdefined port), and update the status in an html file. I used to have a working php script but since that did all the connects 'live' from the html it got shutdown because of generating exessive load. Is there a perlscript that can do this ?
0
2,019
thread by: Fabio | last post Jul 19 '05 by: Fabio
Hello, there's something I'd like to understand... I want to connect to the MS SQL Server database, get some records, store them into the text file, send the file through VPN connection and then send the email message about the task success or failure. First steps are quite easy but using the VPN connection makes me feel powerless......
0
1,306
thread by: sidel | last post Jul 19 '05 by: sidel
Thanks Roy Jim & Mike, Jim & Mike's code worked well, I didn't even think about WHILE. I'll take suggestions and post in the groups mentioned from now on. Thanks for helping a newsgroup/perl noob. js
0
2,011
thread by: Hugh Lutley | last post Jul 19 '05 by: Hugh Lutley
I'm trying to install the Device::SerialPort module using CPAN but whilst CPAN is running 'make test' a couple of errors are flagging so I cannot continue the install without forcing it. I'm not too worried about the errors as the success rate is still around 99.7 percent. Anyway, so how do I force the install?? I tried -f and --force...
3
6,095
thread by: sidel | last post Jul 19 '05 by: Michael Capone
Hello, I have a csv with name, address, city, state, zip (XXXXX-XXXX). I am hoping to group all the similiar zip codes and produce a count on each group. My match so far is m/^\d{5}-\d{4}$/ A match by the first five is ok, but how would I roll through each one? (for example 90210, 90211, 90213 ...) thanks JS
1
12,653
thread by: Woogie | last post Jul 19 '05 by: Roy Johnson
When running the sample code below without a proxy the GET returns the expected data. When run with the $proxy uncommented the GET returns the content of the login page for the site being accessed. The site in the code is valid for ease of testing. I also am including the LWP debug info for each attempt. Can anyone explain this behavior...
1
9,214
thread by: funtoosh | last post Jul 19 '05 by: Ben Morrow
Hi Scenario: I have a shell script e.g. a.bash This script wraps a program called "generate" like this: generate > /tmp/y.txt 2>&1 # both stdout and stderr r redirected to y.txt
0
1,615
thread by: Hale | last post Jul 19 '05 by: Hale
I want to create a namespace, how do I do this w/ h2xs? Basically, I want to create Package1::Subpackage1 Package1::Subpackage2 ..... etc How would I do this? Thanks
6
2,303
thread by: timh | last post Jul 19 '05 by: Hugh Lutley
Hello group, I'm interested in starting to learn Perl and CGI. I'm not having any problems with that. However, setting everything up is not clear to me. What should I do to run my CGI scripts on my computer, with my browser. I need to be able to run these CGI scripts on my own browser, so I can test what I'm doing. I'm not interested in...
1
1,892
thread by: Peter Smith | last post Jul 19 '05 by: Michael Capone
Hi I am writing a message board, and the text is entered in a text box and outputted in HTML. How can I keep the spaces formatting (ie use &nbsp;'s) in the html output?? I use the standard decode lines: $value =~ tr/+/ /;
0
1,674
thread by: Michael Capone | last post Jul 19 '05 by: Michael Capone
Hi folks, I'm using perl (actually, mod_perl environment on RH 8.0) to connect to an external SSL server. I feed it an XML request and get a response back. The problem is, the server is flaky, and I'd like to be able to timeout / break if I haven't gotten a response in X seconds. (Note that the server may connect, but simply not send a...
0
1,388
thread by: Brett | last post Jul 19 '05 by: Brett
Hello All, I'm trying to parse through a webpage, and I used HTML::treebuilder to try to get it into an easily managable data structure. I am having a bit of trouble parsing through it though. Here is a snippet of code: $tree = HTML::TreeBuilder->new; $tree->parse($response->content);
2
2,112
thread by: Munnki | last post Jul 19 '05 by: Munnki
I am learning Perl and was using the Wrox Learning Perl book that I found on the web. The author was explaining the autoincrement operator and try as I might I can't understand this behaviour. The line of code read... $a = "9z"; print ++$a, "\n"; Aparently Perl reads in the ranges a-z, A-Z, 0-9 and if it caps off a range then it will add...

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.