473,606 Members | 2,171 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.
0
2,634
thread by: Subodh | last post Jul 19 '05 by: Subodh
I'm trying to make a HTTP request to a Web server. The Perl module is executed in mod_perl on Apache 1.3 The code : ---------------- my $r = shift; my $browser = LWP::UserAgent->new( ); $url = 'http://10.3.8.137/'; my $response = $browser->get($url); my $response_line = $response->status_line();
0
1,427
thread by: Bernard Guennoc | last post Jul 19 '05 by: Bernard Guennoc
La commande vmstat permet de connaitre périodiquement l'état de la mémoire. Le problème est que pour des raisons de sécurité il n'est pas possible d'accéder à la machine et donc de la lancer à distance... Cependant dans ce cas là, il est prévu parait-il, un demon qui permettrait d'y accéder via un port particulier... QQ'1 de vous en saurait...
5
6,105
thread by: Bill Davis | last post Jul 19 '05 by: Bill Davis
I am just starting to play with CGI programs on a box with RH 9. Testing to see if I had the stuff installed I used a very simple script like so... #!/usr/bin/perl -w use strict; use CGI; It told me that it couldn't find CGI.pm and sure enough, that apparently doesn't come on the RedHat 9 distro. So I installed the latest version of...
1
1,398
thread by: Mark Friedgan | last post Jul 19 '05 by: Mark Friedgan
I would like to make a small script to do the following. replace a / with a - in the following situation it is between a and not following a :// so becomes but http://server/directory/file.html] stays the same
1
2,058
thread by: Kolin | last post Jul 19 '05 by: Jim Gibson
I don't know how to implemente Ackeman function in perl help . Thanks Kolin
1
3,912
thread by: Michael | last post Jul 19 '05 by: Michael
I have a small perl script that inserts data from a tab file to an Access database. my $sth = $dbh->prepare(<<SQL); INSERT INTO Notes ("Account Number", "NUM", "DESC", "UID", "NOTES") VALUES(?,?,?,?,?) SQL $sth->bind_param(1,$rec,SQL_VARCHAR); $sth->bind_param(2,$rec,SQL_VARCHAR);
1
2,107
thread by: mike | last post Jul 19 '05 by: nobull
hi i have written some perl code like this $telnetcmd << "EOF"; perl -ne "chdir(/tmp); while ($file = <*.txt>) { print stat($file); }" EOF print $telnetcmd; it give me some errors:
1
2,590
thread by: ed | last post Jul 19 '05 by: nobull
Folks, I'm attempting to write some OOP with the use strict pragma on an I'm just not getting it to work. Here's an example #!/usr/bin/perl -w use strict; use Automobile; my $file = new Automobile;
2
8,784
thread by: Liang | last post Jul 19 '05 by: Liang
Hi, I'm new to perl. I want to operate array in this way: a). remove one item in an array. For example, @array=(1,3,2,4), and want to remove the 2nd item '3'-- @array=(1,2,4); b). find the difference of two arrays. For example, @a1=(1,3,4);@a2=(1,2,4,5); want to get @a2_new=(all items in @a2, but not in @a1)=(2,5); Does any one know how...
0
2,584
thread by: WS | last post Jul 19 '05 by: WS
Hello, I am trying to tidy up my ActivePerl installation by refreshing the packages. Everything works fine except for perl-ldap. Whenever I check for a new version (upgrade --install) a new one is detected (0.251) and my current one (0.28) gest "upgraded". So far so good. The problem is that I then still have the 0.28 version and the game...
2
4,075
thread by: CwK | last post Jul 19 '05 by: Misha Gale
How to use fork() system function to fork multi child process at the same time ? For example: Run a program to fork 5 child process at the same time and the parent must wait until all child exit. The child do some thing like to read different file at the same time.
1
1,761
thread by: | last post Jul 19 '05 by:
Consider the following almost pseudo example: # main.pl package main; require other; sub mysort() { #* 1. sort algo }
0
3,431
thread by: Dean H. Saxe | last post Jul 19 '05 by: Dean H. Saxe
I'm currently developing a tool in perl to search out potential XSS (Cross Site Scripting) vulnerabilities and correct them in a ColdFusion based web app. I've been having great success so far, however, one scenario has me banging my head against the wall. I need a regex to find all <cfoutput ...>...</cfoutput> blocks in a CFM template. ...
2
5,923
thread by: Fabio | last post Jul 19 '05 by: Fabio
Hello, I'm trying to put the file into the Windows NT server using the Perl script but it doesn't work. Just look at the following script: use Filesys::SmbClientParser; my $fl = '/temp/file.txt'; my $smb = new Filesys::SmbClientParser
0
2,288
thread by: Jussi Mononen | last post Jul 19 '05 by: Jussi Mononen
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** Invalid arguments to divll. at test_eng/Testout.pm line 30. ...propagated at t/polyser.t line 9. t/polyser.....dubious
0
2,639
thread by: Larry | last post Jul 19 '05 by: Larry
Is there a way to easily perform a "comm -3 file1 file2" like function in perl? Basically, I have two arrays and only want to know what the differences are so that I can perform operations on them. Thanks. -- www.eSnider.net
0
2,939
thread by: Gnaneshwar Babu | last post Jul 19 '05 by: Gnaneshwar Babu
Hi I am facing a problem with extracting event logs of win32 to a file. Am using the following code to extract eventlogs to file use Win32::EventLog; $handle=Win32::EventLog->new("System", $ENV{ComputerName}) or die "Can't open Application EventLog\n"; $handle->GetNumber($recs) or die "Can't get number of EventLog records\n";
4
4,941
thread by: Liang | last post Jul 19 '05 by: Liang
Hi all, I want to diff two files or two versions of one file, and parse the output to find a summary of how many lines of replacement/addition/deletion in the two files. Known from diff/cleardiff, the output has a style like: 15a16, 15,17d3, 18c19,21 etc. Anyone know how to parse these output to generate a summary?
1
5,002
thread by: Stefan Schmidt | last post Jul 19 '05 by: Andy R
Hi@ll ! I have an application where the items of each XML value are placed in an array like this: my $result = transfer({ FIELD1 => 'value1', FIELD2 => 0, FIELD3 => "something other" ....
1
2,042
thread by: Big Dix | last post Jul 19 '05 by: Rusty
I am dealing with three different database files. If the user (me) chooses to edit File 1 it opens File1.csv and so onfor File 3 But File three needs to written in a different format then File 1 and File 2. My question is about line 4 I am getting an error. Why and what am I doing wrong that I am missing? any ideas? Thank you
0
1,498
thread by: nb | last post Jul 19 '05 by: nb
What kind of problems is Perl best at solving?
0
1,326
thread by: Dave Bee | last post Jul 19 '05 by: Dave Bee
This is a conceptual question rather than a specific coding one, but hopefully someone might have played around with something similar. In a nutshell, I have around 10 million information entries with lots of data points. My current script has two stages - the first organises certain data points of the data into large (huge) hashes, and the...
1
1,709
thread by: Andrew | last post Jul 19 '05 by: Andrew
Hello, i'm new to this group and have a quick question, I tried to search on this topic but was unsucessful. I'm tring to use a parameter to name a file, actually multiple parameters, and perl doesn't seem to like it. Can anyone tell me what I am doing wrong? my $employee = param('employee'); my $filename = "$employee.txt";
1
11,173
thread by: Hale | last post Jul 19 '05 by: Kemper
Hi, I'm having a problem storing an array inside of a hash. I'm bringing in a hash via a reference and I want to assign a value to it. This is what I'm doing: push (@{$$node->{ELEMENTS}}, "New value"); (I need to use "push" because this is going in a for-loop)
1
3,513
thread by: Mikkel Holm Olsen | last post Jul 19 '05 by: nobull
Hello everyone, Does someone know of a way to handle both keypress and release in a Linux-console (not X) from Perl? It seems this is the only way I'll be able to have keyboard-repeat for some keys, but not for others, or does anyone have other ideas. I have done this before in C with: ioctl(0,KDSKBMODE,K_MEDIUMRAW);

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.