Sub String extraction

2001-08-01 Thread Rajeev Rumale
Hello everybody, I need some help I am working on a searching and extarction secipt, where i need to extract information from HTML and XML files. Its simple I need to find some know tags and gett the information enclosed between them. I faced with a problem when there are multiple ocurances of s

open

2001-08-01 Thread Sally
I've got a script, and when it finishes running I want it to go and open another script. I've used open (filehandle, $filename); but it doesn't seem to have worked, is there a goto command or something else I could use. I can't tag the second script onto the end of the first for security purposes.

Re: Recursive directory copy

2001-08-01 Thread Michael Fowler
On Tue, Jul 31, 2001 at 05:59:59PM -0700, perl newbie wrote: > I have two diretories ( DATA and TEST). The data > directory has several subdirectories under it. I am > trying to find a Perl Module/function, that will allow > me to copy all of the contents of DATA into TEST. > > Is there a module

Re: HTML/CGIPERL/JavaScript related

2001-08-01 Thread Michael Fowler
On Wed, Aug 01, 2001 at 12:16:34PM +0530, Rahul Garg wrote: > What i want is a hyperlink after activated once get disabled.. > I am using HTML/PERL > Can i use onClick event in hyperlink..and onClick make the hyperlink > disabled if there is no other way out..and ho

Internal Server Error

2001-08-01 Thread .
When I try to access the attached script from my server's cgi-bin directory via the web, the browser returns an internal server error message. I am running it on a RedHat Linux 7.0 box, with Apache 1.3.12. I have already checked the directory/file permissions, and confirmed that both perl and se

RE: Internal Server Error

2001-08-01 Thread John Edwards
Do you have other Perl cgi scripts successfully running on the same server? Are they using the same shebang path as this script? (It's the first line of the script #!/usr/bin/perl). Does the script have it's permissions set to execute for all users? What is the error that the server returns? Have

perl interpreter

2001-08-01 Thread Matthias Staudinger
Sorry, I am an absolut beginner, started with perl on Saturday ;) ! Can anybody tell me if - and how - it is possible to start my perl-scripts on computers without a perl interpreter, without an installed perl - on windows-computers of my coworkers? Thanks Matthias -- To unsubscribe,

Re: perl interpreter

2001-08-01 Thread Sascha Kersken
Hi! You just CAN'T. What you have to do is install a Perl interpreter on each computer you want to run Perl scripts on. The best - and most easily to install - distribution for Windows systems is ActivePerl which can be downloaded at www.activestate.com Sascha -- >Von: Matthias Stauding

Re: perl interpreter

2001-08-01 Thread Pierre Smolarek
not strictly true, you can use activestates perl2exe or whatever its called now to embed the interpreter into the script and make it an exe... file size is at least 300 - 400k but it will do what you ask :) remember, this is NOT machine compiled perl, its just fusing the two into one. - Ori

Re: automatically naming scalars

2001-08-01 Thread Brett W. McCoy
On Tue, 31 Jul 2001, Ron Woodall wrote: > Here's the problem. Go to the Compendium of HTML Elements, > www.htmlcompendium.org --> Main Menu --> HTML --> Attribute Pages and click > on one of the tag names. > > The right frame will open up into a list of the tag and all > attribu

Can Perl be used to develop test scenarios?

2001-08-01 Thread Carl Rogers
Good day; Don't know if this is possible, but I'm trying to find out if it is possible to write a Perl script that can "mimic" user input. I'm trying to write a scenario in which a user responds to a pop-up window then hits the "enter" button. Following that, the user populates different fiel

use Filter::decrypt;

2001-08-01 Thread Elie De Brauwer
When i read the perlfaqs and some documents they all said that use Filter::decrypt; is an insufficient way to protect your code. Now i want to know, how can i reverse this ? I have a .pl file encrypted with use Filter::decrypt; how can i make these back human readable ? -- <===

Re: Can Perl be used to develop test scenarios?

2001-08-01 Thread Paul Johnson
On Wed, Aug 01, 2001 at 09:41:48AM -0400, Carl Rogers wrote: > Don't know if this is possible, but I'm trying to find out if it is > possible to write a Perl script that can "mimic" user input. You'll need to be more specific about your platform and windowing software. Are you testing a Perl p

Printing a data structure

2001-08-01 Thread Chris Garringer
I have a data structure $logs[]{}{}[] that has the data parsed from a log file. I need to print the structure in a form that managment can understand. My problem is, I can fill the structure correctly but cannot seem to get a handle on printing it to allow printing the parts in a decent form.

Re: Printing a data structure

2001-08-01 Thread Paul Johnson
On Wed, Aug 01, 2001 at 09:18:30AM -0500, Chris Garringer wrote: > I have a data structure $logs[]{}{}[] that has the data parsed from a > foreach $day (@logs) > { > some code1. > foreach $username (%$day) > { > .some code2. > foreach $authmet

RE: Printing a data structure

2001-08-01 Thread Bob Showalter
> -Original Message- > From: Chris Garringer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 10:19 AM > To: [EMAIL PROTECTED] > Subject: Printing a data structure > > > I have a data structure $logs[]{}{}[] that has the data > parsed from a log file. I need to print the s

Re[2]: perl interpreter

2001-08-01 Thread Maxim Berlin
Hello Sascha, Wednesday, August 01, 2001, Sascha Kersken <[EMAIL PROTECTED]> wrote: SK> You just CAN'T. SK> What you have to do is install a Perl interpreter on each computer you want SK> to run Perl scripts on. can not agree with you because of laziness. ("The three principal virtues of a progr

Re: Internal Server Error

2001-08-01 Thread .
> Do you have other Perl cgi scripts successfully running on the same server? Not as yet... > Are they using the same shebang path as this script? (It's the first line of > the script #!/usr/bin/perl). I have confirmed that the path is correct. > Does the script have it's permissions set to ex

Re: Can Perl be used to develop test scenarios?

2001-08-01 Thread .
If you mean in the way Lisp or Prolog are used to map out scenarios, not exactly. Although, I have heard of cases where Perl was used to kind off glue components (written in Lisp, Prolog, etc) of various scenarios together... I can't remember my source on that. (One of my textbooks, I think.)

Re: Can Perl be used to develop test scenarios?

2001-08-01 Thread Paul Johnson
On Wed, Aug 01, 2001 at 10:25:15AM -0400, Carl Rogers wrote: > Hi Paul. > First of all, I'd like to thank you for taking the time to respond to my > query. I really appreciate your help. No problem. I am replying to the list on the assumption that you meant to do that too. That is the usual et

RE: Converting PHP to Perl

2001-08-01 Thread Bradshaw, Brian
As a beginner myself, I took this as an interesting challenge in working with PERL syntax. However, it seems there is a lot missing here. No DB connection, no array names, $countresult looks undefined, and a couple of other things. Is this the actual code? Does it actually work in PHP? I admit,

Sending mail using PERL with file as body of message

2001-08-01 Thread Rice, Elizabeth A.
I've been looking for a tool to send a email to multiple recipients, using a file as input to the body of the message, that will working on multiple operating systems, and is fairly simple since I'm new at this. I've investiaged Mail::Mailer and Net::SMTP, but maybe because I'm a newbie these s

RE: Sending mail using PERL with file as body of message

2001-08-01 Thread Bob Showalter
> -Original Message- > From: Rice, Elizabeth A. [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 11:58 AM > To: '[EMAIL PROTECTED]' > Subject: Sending mail using PERL with file as body of message > > > ... > Here's the basic sendmail code: > > open(TMPMAIL, "<$tmpma

Trying to create array of hashes

2001-08-01 Thread Bradley Wendelboe
Hello, I'm trying to capture the output from a command a slice and dice it into an array of hashes. The data looks like this: object manager name: snmpCollect state: RUNNING PID: 463 last message:Initialization complete. exit status: - object manag

RE: Trying to create array of hashes

2001-08-01 Thread John Edwards
This should get you started. You don't mention how you are collecting you inital data. Do you run a command several times with different args? Does that command return all results in one hit or are you reading the data from a text file?? Anyway, this will split the data you have into a hash. How

RE: Trying to create array of hashes

2001-08-01 Thread Bradley Wendelboe
The command generates multiple 'records'. Each one of these 'records' are divided by newline. Data-keys within are separated by colons. I want to create an array of these 'records', as hashes. Bradley -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Wednesday, Aug

RE: Trying to create array of hashes

2001-08-01 Thread John Edwards
Try this. Gotta run but it appears to work #$command_to_run = "command"; # @data = `$command_to_run`; open IN, "test2.txt"; @data = ; close IN; # Go through the data you've collected and split into a hash. $x = 1; foreach (@data) { $x++ if /^\n/; chomp; ($key, $value) =

Re: Putting results of find into an array

2001-08-01 Thread Greg Tomczyk
Thank you for the response. I must confess that I have been reading the Perldocs, but I am having some logic troubles, difficult to understand how to use File::Find. I tried using the push routine, but that listed all files instead of only listing all files that have "domain.com". If I change co

Re:[OT]HTML/CGIPERL/JavaScript related

2001-08-01 Thread Paul
--- Rahul Garg <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: Rahul Garg > To: [EMAIL PROTECTED] > Sent: Wednesday, August 01, 2001 11:04 AM > Subject: HTML related > > > Hello , > > What i want is a hyperlink after activated once get > disabled..

RE: check array element (HELP)

2001-08-01 Thread Wagner Jeff Civ Logicon/TTMS
Christopher, Thanks for the comments. After studying your code further, it makes perfect sense. I just got lost in the syntax. Your use of the hash mechanism takes the place of the inner loop. I would guess that, behind the scenes, the hash implementation is doing a similar amount of work (pe

RE: check array element (HELP)

2001-08-01 Thread Wagner Jeff Civ Logicon/TTMS
Let me see if I understand your one-liner... * the "map" function creates a hash, using the array elements as key names, automatically eliminating duplicates * the output from the "keys" function (an array) is compared to the original array, both in scalar context, so the number of elements wil

RE: check array element (HELP)

2001-08-01 Thread Paul
--- Wagner Jeff Civ Logicon/TTMS <[EMAIL PROTECTED]> wrote: > . . . I would guess that, behind the scenes, the > hash implementation is doing a similar amount of work (perhaps an > insertion sort). Actually, it's called a "hash" because it uses a hashing algorithm to place values. It's pretty e

RE: check array element (HELP)

2001-08-01 Thread Paul
--- Wagner Jeff Civ Logicon/TTMS <[EMAIL PROTECTED]> wrote: > Let me see if I understand your one-liner... > > * the "map" function creates a hash, using the array elements as key > names, automatically eliminating duplicates > * the output from the "keys" function (an array) is compared to th

Perl reference

2001-08-01 Thread Romek KrisztiƔn
Hello! I would like to offer you this reference. I've downloaded that and looked very easy to use! http://freshmeat.net/projects/perl-reference/ About: Perl-reference is a program to quickly display reference documentation for a Perl function, variable, regexp operator, or language keyword. T

RE: check array element (HELP)

2001-08-01 Thread Bob Showalter
> -Original Message- > From: Wagner Jeff Civ Logicon/TTMS > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 2:14 PM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: RE: check array element (HELP) > > > Let me see if I understand your one-liner... > > * the "map" f

Re: Sending mail using PERL with file as body of message

2001-08-01 Thread Peter Scott
At 11:57 AM 8/1/01 -0400, Rice, Elizabeth A. wrote: >I've been looking for a tool to send a email to multiple recipients, using a >file as input to the body of the message, that will working on multiple >operating systems, and is fairly simple since I'm new at this. > >I've investiaged Mail::Mail

RE: check array element (HELP)

2001-08-01 Thread Paul
--- Bob Showalter <[EMAIL PROTECTED]> wrote: > . . . > Yep, you've got it. Actually map() is creating a *list*, which is > being used to initalize an anonymous hash. Working from the inside > out: > >map { ($_ => 1) } @arr > > returns a list equivalent to ($arr[0], 1, $arr[1], 1, $arr[

RE: check array element (HELP)

2001-08-01 Thread Bob Showalter
> -Original Message- > From: Paul [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 3:41 PM > To: Bob Showalter; '[EMAIL PROTECTED]' > Subject: RE: check array element (HELP) > > > > --- Bob Showalter <[EMAIL PROTECTED]> wrote: > > . . . > > Yep, you've got it. Actually map

Help with an Apache Server

2001-08-01 Thread Ainda
Hi! I don't know if this is the right place to ask, but since my question is related to Perl, I will try. I have Apache and Perl installed and correctly running under Windows 2000, but a Perl program I wrote needs write permission and I don't know how to grant it. Could you help me?

Your vendor has not defined Fcntl macro

2001-08-01 Thread Bompa
I'm using ActivePerl with Win98. I'm trying to run an irc deamon which is written in perl, but I'm getting a weird error message. The author of the irc deamon has not answered my inquiries. Here's what happens: :\IRC\pircd>perl pircd Ripe and ready to the eye... Your vendor has not defined Fc

Re: Your vendor has not defined Fcntl macro

2001-08-01 Thread Brett W. McCoy
On Wed, 1 Aug 2001, Bompa wrote: > I'm using ActivePerl with Win98. I'm trying to run an irc deamon which is > written in perl, but I'm getting a weird error message. The author of the irc > deamon has not answered my inquiries. Here's what happens: > > > :\IRC\pircd>perl pircd > Ripe and read

Re: Your vendor has not defined Fcntl macro

2001-08-01 Thread Mel Matsuoka
At 03:48 PM 08/01/2001 -0400, Bompa wrote: >I'm using ActivePerl with Win98. I'm trying to run an irc deamon which is >written in perl, but I'm getting a weird error message. The author of the irc >deamon has not answered my inquiries. Here's what happens: > > >:\IRC\pircd>perl pircd >Ripe and

save file in an array

2001-08-01 Thread Jennifer Pan
I want to download a page, and want to save it in an array to parse it later on, I did #usr/local/bin/perl my @list; $URL1= "http://blablabla";; $command="/opt/sfw/bin/wget -nv -O @list $URL1"; system "$command"; print @list; it didn;t work. But if I say $command="/opt/sfw/bin/wget -nv -O list

RE: save file in an array

2001-08-01 Thread Bob Showalter
> -Original Message- > From: Jennifer Pan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 4:45 PM > To: [EMAIL PROTECTED] > Subject: save file in an array > > > I want to download a page, and want to save it in an array to parse it > later on, > I did > > #usr/local/bin/

Re: save file in an array

2001-08-01 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 1, Jennifer Pan said: >$URL1= "http://blablabla";; >$command="/opt/sfw/bin/wget -nv -O @list $URL1"; >system "$command"; >print @list; A program cannot save to a variable. Programs save to file streams or devices or whatever else is around. But not variables. You need to capture the ou

simple form and cgi

2001-08-01 Thread Peter
hi all, im stuck on a simple form using cgi-lib.pl. i keep getting a CGIWrap error: execution failed. im a novice perl guy so everything seems right to me, can someone tell me what im doing wrong? the scripts and the asp page passing the variables are both on a linux machine. thanks, pete

Re: simple form and cgi

2001-08-01 Thread Brett W. McCoy
On Wed, 1 Aug 2001, Peter wrote: > im stuck on a simple form using cgi-lib.pl. i keep getting a CGIWrap > error: > execution failed. Your first problem is using cgi-lib.pl. Don't. Use CGI.pm. It's newer, more robust, and easier to use. And it comes with any distribution of Perl 5. -- Bret

Formatting Question

2001-08-01 Thread Rasoul Hajikhani
Can any one tell me a good source for a formatting package? I need to generate a table and place my text in it for an email program. I have installed Text::Autoformat but I guess it does not have that capability. Perl's format mechanism suffers from extreme complication to lack of documentation. A

Re: Can Perl be used to develop test scenarios?

2001-08-01 Thread Chuck Ivy
On Wednesday, August 1, 2001, at 04:29 PM, beginners-digest- [EMAIL PROTECTED] wrote: > Whilst this could be done in Perl, I don't think it has been, and I > don't think it's a task for a beginner. > > I would take a look at comp.software.testing > > Point a browser at http://www.testingfaqs.org/

y me

2001-08-01 Thread Peter
hi all, i have a new script that i put in the same directory as other working scripts, however when i try to execute i keep getting a "cgiwrap error: execution not permitted ...script file not found" any ideas? thanks, pete -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

RE: perl interpreter

2001-08-01 Thread Bill Odom
Matthias Staudinger asked: > > Can anybody tell me if - and how - it is possible > to start my perl-scripts on computers without a > perl interpreter, without an installed perl - on > windows-computers of my coworkers? > If you mean "run Perl programs from Windows PCs without Perl installed loca

Time::HiRes module compiling on Win2000

2001-08-01 Thread Aziz Shallwani
Hi, I am running ActiveState Perl v.5.6.1 build 626 on Win2000. I have downloaded the Time::HiRes module v.1.20 from CPAN and I am having trouble compiling it. I downloaded nmake... and I have tried to run: perl Makefile.PL nmake nmake test nmake install The nmake command fails with fatal error

removing redundant entries in an array

2001-08-01 Thread Charles Lu
hi I have this problem where I have a list of numbers such as @list = (1,2,3,4,2,67,4,4,9); I want to remove all the redundant ones so the final list should contain (1,2,3,4,67,9). Although I have implemented my own way of doing it, I think this problem is quite common and therefore some

Re: removing redundant entries in an array

2001-08-01 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Charles Lu said: >@list = (1,2,3,4,2,67,4,4,9); > >I want to remove all the redundant ones so the final list should >contain (1,2,3,4,67,9). Although I have implemented my own way of doing >it, I think this problem is quite common and therefore someone must have >written a function

Re: removing redundant entries in an array

2001-08-01 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Jeff 'japhy/Marillion' Pinyan said: >On Aug 2, Charles Lu said: > >>@list = (1,2,3,4,2,67,4,4,9); >> >>I want to remove all the redundant ones so the final list should >>contain (1,2,3,4,67,9). Although I have implemented my own way of doing >>it, I think this problem is quite common

Re: removing redundant entries in an array

2001-08-01 Thread Brett W. McCoy
On Thu, 2 Aug 2001, Jeff 'japhy/Marillion' Pinyan wrote: > >The key is not to use a hash to do the checking. > > Err, the key is not to use an ARRAY to do the checking, but to use a hash > instead, as the FAQ suggests. I see I'm not the only one up late coding... -- Brett

adding an element to an array in a hash of arrays...

2001-08-01 Thread Jim Conner
How can I do this? :) - Jim -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- http://www.perlmonks.org/index.pl?node_id=67861&lastnode_id=67861 -BEGIN PERL GEEK CODE BLOCK- --BEGIN GEEK CODE BLOCK-- Version: 0.01 Version: 3.12

General module question, can't get anything imported.

2001-08-01 Thread jeffl
I tried building my own module but I can't get the calling script to see the variables being imported. # below is the module --- #!/usr/bin/perl package Foo; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw($foo_var); o

Re: adding an element to an array in a hash of arrays...

2001-08-01 Thread jeffl
push @{ $HoA{key} }, "new value", "some other value"; On Thu, 2 Aug 2001, Jim Conner wrote: > Date: Thu, 02 Aug 2001 01:21:38 -0400 > From: Jim Conner <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: adding an element to an array in a hash of arrays... > > How can I do this? :) > > > >

Re: adding an element to an array in a hash of arrays...

2001-08-01 Thread Brett W. McCoy
On Thu, 2 Aug 2001, Jim Conner wrote: > How can I do this? :) Assuming you have $myhash{myarrayref} = [ 'stuff', 'more stuff', 'even more stuff' ]; You can do: push(@{$myhash{myarrayref}}, $somedata); or $myhash{myarrayref}->[3] = $somedata; -- Brett

Re: Formatting Question

2001-08-01 Thread Troy Denkinger
On Wednesday 01 August 2001 18:29, Rasoul Hajikhani wrote: > Can any one tell me a good source for a formatting package? I need to > generate a table and place my text in it for an email program. I have > installed Text::Autoformat but I guess it does not have that capability. Well, to create rep

Re: y me

2001-08-01 Thread Troy Denkinger
On Wednesday 01 August 2001 19:34, Peter wrote: > i have a new script that i put in the same directory as > other working scripts, however when i try to execute > i keep getting a "cgiwrap error: execution not permitted > ..script file not found" Hmmm, well, this is not a perl question, really.

Re: General module question, can't get anything imported.

2001-08-01 Thread Troy Denkinger
On Wednesday 01 August 2001 23:59, jeffl wrote: > !/usr/bin/perl Once I changed the above to #!/usr/bin/perl your script and module worked for me. If that doesn't fix it, run the script by invoking the perl interpreter: perl test.pl and see what happens. Regards, Troy -- To unsubscrib

DBI question (again)

2001-08-01 Thread Elie De Brauwer
Extracted from the perl cookbook use DBI; $dbh = DBI->connect('DBI:driver:database', 'username', 'auth', { RaiseError => 1, AutoCommit => 1}); $dbh->do($SQL); $sth = $dbh->prepare($SQL); $sth->execute(); while (@row = $sth->fetchrow_array) { # ... } $sth->finish(); $dbh->disconne