ping

2002-02-22 Thread Lanceo
Hi, I am having difficulty getting the Net::Ping module to work properly. I am using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a dos prompt ok, but when I try to get the Perl Net::Ping to work it always returns a failure. It seems to ponder over pinging the host for a co

Re: [Q] Validating Forms?!

2002-02-22 Thread Jonathan E. Paton
> And then you can also write an entire validate > routine in Javascript,say 'validateForm' and > associate that with onSubmit event. Pass the form > object itself, by invoking the function as name... onSubmit="return validateForm(this);"> Lets make the headline short: ALWAYS VALIDATE IN P

$ENV{remote_user} - solved

2002-02-22 Thread IT Workflow - Terry Honeyford
Thanks to all who sugested that I needed to Define an authentication realm for my CGI directory That did the trick! terry On Thu, Feb 21, 2002 at 02:42:31PM -, IT Workflow - Terry Honeyford wrote: > but when I use Apache 1.3.22 I don't get as many $ENV's back from > the server, in particul

Re: ping

2002-02-22 Thread Tanton Gibbs
The problem is that your web page needs to be specified as http://www.google.com You left off the http:// However, when I tried to run this using activestate 5.6.1.631 on Windows 98, I got an error saying that alarm was Unimplemented. I had to change to udp to get rid of that error. Does anyon

YAPE::Regex::Explain

2002-02-22 Thread Tanton Gibbs
I just found Jeff Pinyan's YAPE::Regex::Explain module and I must say that it is a beginners dream. Now, you can put any cryptic regular expression into his module and it will come out with a dazzling explanation. For example: print YAPE::Regex::Explain->new( '^[A-Za-z_]\w*$')->explain(); prin

YAPE::Regex::Explain pt 2

2002-02-22 Thread Tanton Gibbs
Sorry...mail program went bonkers prints out NODE EXPLANATION -- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not

Re: What would take care of this?...

2002-02-22 Thread Chris Ball
> "Daniel" == Daniel Falkenberg <[EMAIL PROTECTED]> writes: Daniel> Would I now have to go ahead and use HTML::parser or Daniel> something of similar nature to extract headings? Yeah, go with HTML::TokeParser. Daniel> Daniel> Get all data from H1 BGCOLOR="FF">I want al

convert array to integer

2002-02-22 Thread kitti
how to convert array to integer $array[0]=5 $array[1]=6 $array[2]=7 $array[3]=8 change to integer 5678 for calculate 5678+2=5680 thanks,

Re: convert array to integer

2002-02-22 Thread Jon Molin
kitti wrote: > > how to convert array to integer > > $array[0]=5 > $array[1]=6 > $array[2]=7 > $array[3]=8 > one way to do it is: my @array = (5, 6, 7, 8); my $some_val; $some_val .= $_ for (@array); another is: my @array = (5, 6, 7, 8); my $some_val = "@array"; $some_val =~ s/[^\d]//g; a

Re: convert array to integer

2002-02-22 Thread walter valenti
kitti wrote: >how to convert array to integer > >$array[0]=5 >$array[1]=6 >$array[2]=7 >$array[3]=8 > >change to integer 5678 for calculate 5678+2=5680 > >thanks, > In not much elegant... foreach(@array){ $num.=$_; } $num=$num-0; Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: convert array to integer

2002-02-22 Thread John Edwards
You want to take a sum of all the array elements?? You don't need to convert the array to an interger. Perl handles this internally. For instance, if you want to treat a text string as a number, or a number as a text string, perl allows it. This does what you are after use strict; my @array = q

RE: convert array to integer

2002-02-22 Thread John Edwards
$num=$num-0; You don't need to do this in Perl. There is no distinction between an integer and a string. It's just a scalar. This is something you would have to do in Javascript though. John -Original Message- From: walter valenti [mailto:[EMAIL PROTECTED]] Sent: 22 February 2002 12:12

Re: convert array to integer

2002-02-22 Thread John W. Krahn
Kitti wrote: > > how to convert array to integer > > $array[0]=5 > $array[1]=6 > $array[2]=7 > $array[3]=8 > > change to integer 5678 for calculate 5678+2=5680 $ perl -le' @array = qw(5 6 7 8); print 5678 + 2; print join( "", @array ) + 2; ' 5680 5680 John -- u

Re: ping

2002-02-22 Thread insomniak
Hi If you are looking to find out is a host is alive try this bit of code. $host = www.google.com; $ip=join ".",unpack("C4",(gethostbyname($host))[4]); $ip will be empty if host is dead from command line perl -e "print join \".\",unpack(\"C4\",(gethostbyname(@ARGV[0]))[4]);" www.google.com ho

Re: Postgres Module in Windows?

2002-02-22 Thread Jonathan E. Paton
> I've searched high and low for a module, any module, > that would allow me to make called to the postgres > database in Windows, but have come up empty. use DBI; > There doesn't even seem to be a way to do it from > DBI. Does anyone have any experience with this? I > would love it if someone

Re: What would take care of this?...

2002-02-22 Thread Jonathan E. Paton
--- Daniel Falkenberg <[EMAIL PROTECTED]> wrote: > Hey All, > > Just wondering how I would go about extracting all > the data from heading 1 (h1) in the following HTML > code. I figured I could have used HTML::TableExtract > but then I realized ( :) ) there are not tables in > the following HT

Re: What would take care of this?...

2002-02-22 Thread Chris Ball
> "Jonathan" == Jonathan E Paton <[EMAIL PROTECTED]> writes: Jonathan> /([^<]*?)<\/h1>/ Please don't ever try and parse HTML with regexps - I've had to work with way too much code that did. There are many situations where your regex would break, and the TokeParser code wasn't much longe

Re: Postgres Module in Windows?

2002-02-22 Thread Jenda Krynicky
From: "Agustin Rivera" <[EMAIL PROTECTED]> > I've searched high and low for a module, any module, that would allow > me to make called to the postgres database in Windows, but have come > up empty. There doesn't even seem to be a way to do it from DBI. Does > anyone have any ex

Re: Perl subroutines using array & hash????

2002-02-22 Thread Jenda Krynicky
From: "Bruce Ambraal" <[EMAIL PROTECTED]> > JON MOLIN many thanks to you too..., if that's what you want to hear. > Don't have time for these question need to get myself skilled in Perl > soonest. I see ... so you don't have enough time to answer a simple question like "Is t

file size

2002-02-22 Thread anthony
Hi, I have an upload script, and i want to check the file size before it uploads. Any suggestion is appreciated Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: file size

2002-02-22 Thread John Edwards
Upload via FTP? Via a web based form? 18 questions left... John -Original Message- From: anthony [mailto:[EMAIL PROTECTED]] Sent: 22 February 2002 14:22 To: [EMAIL PROTECTED] Subject: file size Hi, I have an upload script, and i want to check the file size before it uploads. Any sugg

Re: file size

2002-02-22 Thread Jon Molin
anthony wrote: > > Hi, > > I have an upload script, and i want to check the file size before it > uploads. > > Any suggestion is appreciated > > Anthony > here's some old code that does that, might be something built-in in CGI.pm as well: my $tempFile = CGI::tmpFileName($img_filename);

[Q]How can I pass Perl variables into shell?

2002-02-22 Thread Bhanu Prakash
Thanks japhy and Wags ;) It works fine now with the backslashes! Bhanu On Feb 21, Wagner-David said: > The $1 and $2 come out of reqex with parens. That's not helping, though. The answer he seeks is: backslash the $ signs. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] htt

Re: file size

2002-02-22 Thread Chris Ball
> "Anthony" == awards writes: Anthony> Hi, I have an upload script, and i want to check the file Anthony> size before it uploads. The stat() function returns a list that includes file size as the seventh element. You can use: $size = (stat($filename))[7]; ... to retrieve the

Re: ping

2002-02-22 Thread Johan H
On Fri, 2002-02-22 at 15:18, insomniak wrote: > Hi > If you are looking to find out is a host is alive try this bit of code. > > $host = www.google.com; > $ip=join ".",unpack("C4",(gethostbyname($host))[4]); > > $ip will be empty if host is dead > > from command line > > perl -e "print join \"

Re: file size

2002-02-22 Thread Jeff 'japhy' Pinyan
On Feb 22, Chris Ball said: >> "Anthony" == awards writes: > >Anthony> Hi, I have an upload script, and i want to check the file >Anthony> size before it uploads. > >The stat() function returns a list that includes file size as the >seventh element. You can use: > > $size = (stat

Re: ping

2002-02-22 Thread Chris
Lanceo wrote: > Hi, > > I am having difficulty getting the Net::Ping module to work properly. I am > using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a > dos prompt ok, but when I try to get the Perl Net::Ping to work it always > returns a failure. It seems to ponder over

Creating a valid directory.

2002-02-22 Thread Steven M. Klass
Hi all, I want to create a new directory but I need to make sure that it's valid. Here is what I want to do. Given a starting file hierarchy of something like this Top Level .hidden Sub Level 1a .hidden2 Sub Level2a Sub L

[Q]Setting global variables.

2002-02-22 Thread Bhanu Prakash
Perl Gurus, How can I set global variables in perl.? I'm trying to do something like.. if(param()) { my $myvar=param("myvar"); if(param("myvar2"){ use $myvar here.. Has some script to show a form.. } else { On submitting the form, user enters here.. someother use of $myvar.. Here, my script i

Re: file size

2002-02-22 Thread anthony
Hi, But i tried this i didn't $size= -s $filename but it didn't work, anyways i want my upload script not to upload files that are bigger than 250Kb Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: renaming files (versioning)

2002-02-22 Thread Johannes Franken
On Tue, Feb 19, 2002 at 11:52:24PM -0500, Bill Akins wrote: > I have to keep all versions of the existing files and oldest must > have the highest -v## (version number) and newest is just data.txt. > Is this a job better done in bash or perl? what about rcs? (that's "revision control system" an

Re: Need help with if statement - please

2002-02-22 Thread David Wall
Chris <[EMAIL PROTECTED]> wrote on 21 Feb 2002: >> print "4 pings, $count were successful\n"; >> > > Not sure if the Net::Ping will give me what I really need... > > What you saw is a VERY small part of the program, and all I > wanted to do was give some realistic status, visually, "realti

[Q]Validating Forms?!

2002-02-22 Thread Bhanu Prakash
> And then you can also write an entire validate > routine in Javascript,say 'validateForm' and > associate that with onSubmit event. Pass the form > object itself, by invoking the function as name... onSubmit="return validateForm(this);"> Jonathan, Validating in Perl?!I'm interested.!

Re: Perl calling Visual Basic

2002-02-22 Thread Chris
Joanne Kowalinski wrote: > Hi, > > I am thoroughly lost and do not know how to do this, or even if it is > possible to do. > We want to have an activestate perl program running on one of our NT > gateways call > a Visual Basic application. The return code from the VB app will then > control the

RE: Sorting situation on how to handle a sort where some items may no t be numeric

2002-02-22 Thread Wagner-David
Very slick on second method. Worked and no warnings. Thanks much. Wags ;) -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 00:06 To: Wagner-David Cc: 'Beginners' Subject: Re: Sorting situation on how to handle a sort

Re: Perl calling Visual Basic

2002-02-22 Thread Jenda Krynicky
From: Chris <[EMAIL PROTECTED]> > Calling the VB app "should" be fairly straight, if it is local to the > Perl program... > > @result = `myCompiledVBApp AnyArgs`; > > If the VB App returns anything, the @result should (hopefully???) > catch it... I don't think the VB applicati

Re: Perl calling Visual Basic

2002-02-22 Thread Chris Ball
> "chris" == chris <[EMAIL PROTECTED]> writes: chris> @result = `myCompiledVBApp AnyArgs`; chris> Anyone think I have lost my mind, or did I get one right??? Close. I don't see why you're passing the return to an array rather than scalar (@ rather than $), since it should just be a

Re: Opposite of $respose->is_success

2002-02-22 Thread Peter Scott
At 05:26 PM 2/21/02 -0800, I wrote: >At 02:00 PM 2/21/02 +1030, Daniel Falkenberg wrote: >>Hey all, >> >>Just wondering if any one know what the oposite of $response->is_success >>in the code below? I have tried $response->is_fail and >>$response->is_failure. > >Oh so close :-) > >$response->is_e

Re: ping

2002-02-22 Thread Peter Scott
At 09:19 AM 2/22/02 +, Lanceo wrote: >Hi, > >I am having difficulty getting the Net::Ping module to work properly. I am >using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a >dos prompt ok, but when I try to get the Perl Net::Ping to work it always >returns a failure. It

php and perl

2002-02-22 Thread Joyce Harris
I have a php form and I need to do some data validation either before inserting data into the database or comparing data in a textfield to data in the database. It seems like the easiest way to do this is using perl. How do you call a perl script from a php script. Thanks, Joyce -- ÐÏࡱá

RE: ping

2002-02-22 Thread Timothy Johnson
I had the same problem at first, but I've found that if you want the Net::Ping module to work on a Win32 platform, you might have better luck sticking to the ICMP protocol (which is what your command-line ping is using). Something like this usually works for me: my $p = Net::Ping->new('icmp',2

Re: Timestamp and File::find

2002-02-22 Thread Johannes Franken
On Wed, Feb 20, 2002 at 04:32:40PM -0500, [EMAIL PROTECTED] wrote: > can one specicify a time stamp when using FileFind? sure, just do the timerange comparison within the wanted() subroutine: #!/usr/bin/perl use File::Find; use File::stat; sub isnew { # tells if th

RE: convert array to integer

2002-02-22 Thread Aaron Shurts
This may not be a better way, but another way is: my(@array) = (5, 6, 7, 8); my($integer) = sprintf("%1d%1d%1d%1d", @array[0], @array[1], @array[2], @array[3]); -_-Aaron -Original Message- From: Jon Molin [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 4:06 AM To: kitti Cc: [

Re: php and perl

2002-02-22 Thread Johnathan Kupferer
In my humble opinion, it doesn't make sense to break up the script that generates the form and the one that validates it. Its hard enough to maintain an application without having to worry about two scripts in two different languages for something as simple as presenting and validating a form

Time to ask for help

2002-02-22 Thread Hockey List
Ok. Time to ask for help. Remember me, they guy who wanted to make the goalies stats module? Well, I have learned enough perl to do it (pat myself on the back). I got a script that runs and essentially does what I want it to do, but has a couple problems. For now, Im settling for a simple program

Re: php and perl

2002-02-22 Thread Tanton Gibbs
I wonder why you need perl at all if you are using php? Unless you want to use a prewritten perl module, there is no reason to not continue using php. However, if you do plan on using perl, I would recommend changing completely to perl as it does get very complicated to have to maintain a two se

TIme to ask for help

2002-02-22 Thread Hockey List
Ok. Time to ask for help. Remember me? The guy who wanted to write a program to update goalie stats? Well, I wrote a script that runs and essentially does what I want it to do, but has a couple problems. For now, Im settling for a simple program where I input the stats by hand and the program u

using perl to generate a simple report.

2002-02-22 Thread Carlo Sayegh
Hello All, I've written a very simple script where the user inputs data, from which a report is generated. My problem is that some of this data is in rows and columns and every time the user hits enter to start a new line, the script thinks they are done and moves on to the next part of the s

Re: How to split on case boundries?

2002-02-22 Thread Tim Musson
Hey Jeff, My MUA believes you used (X-Mailer not set) to write the following on Thursday, February 21, 2002 at 2:13:31 PM. JjP> On Feb 20, Tim Musson said: >>The people who control the data want to remove the _ chars and make >>the delimiter based on the case of the chars (first char of each par

Re: Need help with if statement - please

2002-02-22 Thread Shaun Fryer
> Not sure if the Net::Ping will give me what I really need... > > What you saw is a VERY small part of the program, and all I wanted > to do was give some realistic status, visually, "realtime". > > It is all being logged to a file, and that output MUST be exactly > like standard PING output. T

RE: To create a hash of lists

2002-02-22 Thread William . Crain
Thanks for the quick and excellent response. I quoted your answer for the benefit of others. Perl's syntax to work with references is giving me a few "growing pains" I suppose, though I'm not opposed to working with it once I get it through my head what is required to make Perl understand what

Re: Converting windows txt file format to Linux txt file format

2002-02-22 Thread Johnathan Kupferer
You don't need perl for this. The easiest approach is to use the "dos2unix" utility. Use "man dos2unix" for more information. - Johnathan Lilian Alvarenga Caravela Godoy wrote: >Hi everyone > >I am trying to upload a windows txt file to a Linux server. > >There are an application running in

RES: Converting windows txt file format to Linux txt file format

2002-02-22 Thread Lilian Alvarenga Caravela Godoy
Yes, Johnathan Now I know it. I didn't know it because Linux and perl are really new to me. Then I thought that I should write a perl script to do it. Thank you. -Mensagem original- De: Johnathan Kupferer [mailto:[EMAIL PROTECTED]] Enviada em: sexta-feira, 22 de fevereiro de 2002 16:07

Re: using perl to generate a simple report.

2002-02-22 Thread Geoffrey F. Green
What is the code you're using to accept the user input? On 2/22/02 1:40 PM, "Carlo Sayegh" <[EMAIL PROTECTED]> wrote: > I've written a very simple script where the user inputs data, from which > a report is generated. My problem is that some of this data is in rows > and columns and every time

Looping

2002-02-22 Thread slhgkh5
The following script needs to loop through a file identifying users in each user group and the outputting that to a specific file. In the end if I have 15 groups I should have 15 files. However, when I loop I only get the last group outputted to the correct file. What I think is happening

system() output question.

2002-02-22 Thread Wert, Nathaniel
I would like to be able to take the output of system(some cmd) and send it to a filehandle. How is this possilbe? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: system() output question.

2002-02-22 Thread Timothy Johnson
Maybe system() isn't really what you want then. Try using backticks: $scalar = `some cmd`; print OUTFILE $scalar; -Original Message- From: Wert, Nathaniel [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: system() output question. I wo

RE: system() output question.

2002-02-22 Thread Nikola Janceski
man perlipc line 308 "Using open() for IPC" use open(COMMAND, "your command | "); now you can read from besure to close COMMAND; -Original Message- From: Wert, Nathaniel [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 3:11 PM To: [EMAIL PROTECTED] Subject: system() output

Re: Looping

2002-02-22 Thread Jonathan E. Paton
Hi, DO NOT CROSS-POST PLEASE Many who read PBML also read [EMAIL PROTECTED], and won't appreciate answering questions answered elsewhere, it creates duplicate effort on behalf of those providing free answers (by their own, unpaid, freewill). Crossposting is one of the few ways to lose hospitali

Logic rewrite help...

2002-02-22 Thread Frank Newland
Quick help pls.. I want to use only 'and' statements. How can I get rid of this OR ?? My Boolean algebra is not functional at the moment... where ((A) or (not B ) ) TIA.. Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: using perl to generate a simple report.

2002-02-22 Thread Michael Kelly
On 2/22/02 10:40 AM, Carlo Sayegh <[EMAIL PROTECTED]> wrote: > Hello All, Hi Carlo, > I've written a very simple script where the user inputs data, from which > a report is generated. My problem is that some of this data is in rows > and columns and every time the user hits enter to start a ne

Re: Logic rewrite help...

2002-02-22 Thread Jonathan E. Paton
--- Frank Newland <[EMAIL PROTECTED]> wrote: > Quick help pls.. > > I want to use only 'and' statements. How can I get rid > of this OR ?? My Boolean algebra is not functional at > the moment... > > where ((A) or (not B ) ) = _ _ _- _ = _

RE: using perl to generate a simple report.

2002-02-22 Thread Timothy Johnson
If he's using Windows, ^Z is the EOF character. -Original Message- From: Michael Kelly [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 12:35 PM To: [EMAIL PROTECTED] Subject: Re: using perl to generate a simple report. On 2/22/02 10:40 AM, Carlo Sayegh <[EMAIL PROTECTED]> wr

Re: [Q]Setting global variables.

2002-02-22 Thread Jonathan E. Paton
> Perl Gurus, > > How can I set global variables in perl.? I'm trying > to do something like.. The logic is broken, I believe this is more appropriate: my $myvar = param("myvar"); unless ($myvar) { # Show form } else { # Process form } Jonathan Paton _

Re: Logic rewrite help...

2002-02-22 Thread Jenda Krynicky
From: Frank Newland <[EMAIL PROTECTED]> > I want to use only 'and' statements. How can I get rid of this OR ?? > My Boolean algebra is not functional at the moment... > > where ((A) or (not B ) ) Anything you wish ... not( not(A) and B) #!perl sub good { my

Re: [Q]Validating Forms?!

2002-02-22 Thread Jonathan E. Paton
> Validating in Perl?! I'm interested! Of course, perl has regular expressions far superiour to anything Javascript offers. In fact, I once looked at validating in Javascript and decided the character manipulation was far too much effort. You seem surprised... why? > Can you send me some samp

Sockets in an array

2002-02-22 Thread Girish Chandran
Hi, I have the following problem. Context: I am trying to open multiple sockets to multiple IP address. I want to use the same piece of code to do that. The IP addresses and port numbers are stored in a file. The program: I read the file, open the sockets in sequence. The sockets (globs/hand

RE: Sockets in an array

2002-02-22 Thread Nikola Janceski
I have run into this situation before, but never found a solution.. But now that I see the problem try the following prints: print ${$newsocket[$i]} $command; print *{$newsocket[$i]} $command; print *newsocket[$i] $command; I think the second one might work... let us know how it goes. -Orig

RE: Perl calling Visual Basic

2002-02-22 Thread Dean Theophilou
Of course, you can always have VB output the results to a text file and then have Perl read it. I think that would probably be the simplest way to do it. Dean Theophilou -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Ball Sent: Friday, February

Anyone still use cgi-lib.pl?

2002-02-22 Thread Kevin Old
Hello all, I was wondering if anyone still used cgi-lib.pl anymore or used any of its subroutines for processing data in their applications. I am writing a secure application and don't see any harm in using the ReadParse subroutine for processing the data, but since checking with the URL it once

Re: Anyone still use cgi-lib.pl?

2002-02-22 Thread Geoffrey F. Green
My (admittedly inexperienced) advice: use CGI.pm It's been included with the standard Perl distribution for a while now - geoff On 2/22/02 6:21 PM, "Kevin Old" <[EMAIL PROTECTED]> wrote: > I was wondering if anyone still used cgi-lib.pl anymore or us

Re: Anyone still use cgi-lib.pl?

2002-02-22 Thread Jonathan E. Paton
> I was wondering if anyone still used cgi-lib.pl > anymore or used any of its subroutines for processing > data in their applications. Nope, don't use Perl4 stuff in Perl5 stuff... > I am writing a secure application and don't see any > harm in using the ReadParse subroutine for processing > th

Re: convert array to integer

2002-02-22 Thread Shaun Fryer
Try this little baby. @array = (5, 6, 7, 8); $integer = print(@array); chop($integer); === Shaun Fryer === London Webmasters http://LWEB.NET PH: 519-858-9660 FX: 519-858-9024 === -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: Sockets in an array

2002-02-22 Thread John W. Krahn
Girish Chandran wrote: > > Hi, > > I have the following problem. > > Context: > I am trying to open multiple sockets to multiple IP address. > I want to use the same piece of code to do that. > The IP addresses and port numbers are stored in a file. > > The program: > I read the file, open the

Re: Anyone still use cgi-lib.pl?

2002-02-22 Thread Brett W. McCoy
On Fri, 22 Feb 2002, Kevin Old wrote: > I was wondering if anyone still used cgi-lib.pl anymore or used any of its > subroutines for processing data in their applications. I am writing a > secure application and don't see any harm in using the ReadParse subroutine > for processing the data, but

Book suggestion

2002-02-22 Thread Anidil Rajendran-Raj
Hi team, I am unix admin trying to learn perl. How is the book "LEARNING PERL BY EXAMPLE" by Ellie Quigley regs Anidil Rajendran (raj) Netliant,Inc 3600,Brigde Parkway Suite 102 Redwood City,CA 94065-1170 (650) 730 8271 <>

Re: Time sensative Sub Routine

2002-02-22 Thread Shaun Fryer
I did this by storing the data as an associative array within a database. The HTML form where the person inputs their message POSTS the data to a CGI which then inputs it into a database with the current localtime(time) used as a unique key. The date the person selected for delivery is also conver

Re: Book suggestion

2002-02-22 Thread Paresh Kakrecha
I would suggest "Learning Perl by O'Reilly" -Paresh. At 04:28 PM 2/22/2002 -0800, Anidil Rajendran-Raj wrote: >Hi team, > >I am unix admin trying to learn perl. How is the book "LEARNING PERL BY >EXAMPLE" by Ellie Quigley >regs > > > >Anidil Rajendran (raj) >Netliant,Inc >3600,Brigde Parkway Suit

Re: Book suggestion

2002-02-22 Thread Oliver Andrich
Hi, I would suggest going for the O'Reilly Books. Best choice in my eyes. Best regards, Oliver -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

sharing subroutines

2002-02-22 Thread bob ackerman
is there a way to share uncompiled perl scripts? that is, to include the subroutines of one script file into another script file. failing that, can i easily compile a perl script and use it in a script? why am i having trouble figuring this out? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Book suggestion

2002-02-22 Thread Elaine -HFB- Ashton
Anidil Rajendran-Raj [[EMAIL PROTECTED]] quoth: *>Hi team, *> *>I am unix admin trying to learn perl. How is the book "LEARNING PERL BY *>EXAMPLE" by Ellie Quigley http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq2/Perl_Books.html Though that book isn't mentioned specifically, I recall that Dav

RE: sharing subroutines

2002-02-22 Thread Timothy Johnson
I take it you mean besides cutting and pasting the text? I'm not sure exactly what you're asking. If your subroutine is not part of a "compiled" script, why not just copy the subroutine's code into your script? As for an easy way to compile a perl script, there are two well-known products for

Re: sharing subroutines

2002-02-22 Thread Brett W. McCoy
On Fri, 22 Feb 2002, bob ackerman wrote: > is there a way to share uncompiled perl scripts? that is, to include the > subroutines of one script file into another script file. > failing that, can i easily compile a perl script and use it in a script? > why am i having trouble figuring this out? T

Re: sharing subroutines

2002-02-22 Thread bob ackerman
fine, except that creating a module seems like a big deal. you are minimizing the effort when you show me one subroutine as a module. there is a heap of bookkeeping to attend to. the docs indicate that modules are meant to be created and put in public use - i.e., generally of use. i just want a

Re: convert array to integer

2002-02-22 Thread John W. Krahn
Shaun Fryer wrote: > > Try this little baby. Why? > @array = (5, 6, 7, 8); > $integer = print(@array); > chop($integer); John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sharing subroutines

2002-02-22 Thread Tanton Gibbs
I don't think creating a module is a big deal...how about file Utility.pm: package Utility; sub trim { my $val = shift; $val =~ s/^\s+//; $val =~ s/\s+$//; return $val; } In file user.pl use Utility; while( <> ) { print Utility::trim( $_ ); } There is a module containing a utility

Re: sharing subroutines

2002-02-22 Thread bob ackerman
hmm. i got scared by the perlmod doc. they show a big template to use. and it doesn't have to run through any other program to massage it? and it will be found if the file is in the same directory as the file that calls it? ok. i'll try it. is this an obvious feature that i was unable to grasp f

Re: sharing subroutines

2002-02-22 Thread bob ackerman
Almost. i had to add a '1;' at end of module file or i get error: Util.pm did not return a true value at ./pwrk line 5. BEGIN failed--compilation aborted at ./pwrk line 5. other than that - amazingly simple. can't imagine why it was so hard to figure out or even just find an example of. don't ot

Module call/stdin

2002-02-22 Thread Chip Dunning
I am definitely new to Perl - so here is my basic question. I have a module called from a script. I want the script to call the module and pass it a filename. The module will use that filename in the same manner as if it came from the command like (ex. while (<>) { } ). Chip -- To uns

RE: Module call/stdin

2002-02-22 Thread Timothy Johnson
If I understand your question correctly, then all you want to do is iterate through a list, performing some action on each item. You can just use a foreach loop for this: foreach $file(@files){ Module::Function($file){ do something... } } unless you actually want to do someth

Re: sharing subroutines

2002-02-22 Thread Tanton Gibbs
Yes, I always forget the 1...that has to be the most annoying feature with modules. To me there is a big difference between an OOP module and a namespace module (to borrow a term from C++). What you were after was a namespace module, just a place to collect your functions so that they can be reu