Re: Web client & JavaScript

2002-06-23 Thread David vd Geer Inhuur tbv IPlib
Hi, I have no-one seen responding to your e-mail. I have done some tricks to submit a form with a href link and I have a solution to change the location, by just adding an extra value to it. I don't know how your external page looks up incoming vars, but you might want to test it in post and g

Re: what does this pattern match?

2002-06-23 Thread Shawn
Hello again, This will remove all new lines from $_. Shawn - Original Message - From: "Postman Pat" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 1:49 AM Subject: what does this pattern match? > $_=~s/\n//msg; > > What does the above match? > > LK > > --

Re: sorting a hash by value.

2002-06-23 Thread Shawn
Hello Pat, You can do it like so: my %hash; foreach(sort {$hash{$a} <=> $hash{$b} } keys %hash) { } Shawn - Original Message - From: "Postman Pat" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 1:46 AM Subject: sorting a hash by value. > Gree

what does this pattern match?

2002-06-23 Thread Postman Pat
$_=~s/\n//msg; What does the above match? LK -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

sorting a hash by value.

2002-06-23 Thread Postman Pat
Greetings, I would like to sort a hash by value. The hash values are numbers. I would like to sort this by desceding order. How would I do this? I have searched and found nothing on it. I have found lots on sorting by key though... Please help dudes! Ciao LK -- To unsubscribe, e-mail: [EMAI

RE: how to include a subroutine from external file?

2002-06-23 Thread Timothy Johnson
I think you're overestimating the effort required to make a module. Take this sample module for instance: ## package Tim::UC; #Usage: Tim::UC::UCArray(\@array); #Desc: Takes an array ref as an argument and # converts the entire array to uppercase. sub UCArray{ my $ref =

Re: how to include a subroutine from external file?

2002-06-23 Thread drieux
On Sunday, June 23, 2002, at 03:47 , Hytham Shehab wrote: [..] Hytham - as I like to warn folks, "Oh sure, that's what you say today..." we all start at some place... and the simple library trick is probably where we all start... Remember that you have to in essence 'fully qualify' the

Re: how to include a subroutine from external file?

2002-06-23 Thread drieux
On Sunday, June 23, 2002, at 03:47 , Hytham Shehab wrote: > i think that writing a module is not my answere, i think it is a huge > complicated answere for a simple question. actually in the long run it will simplify the process. > all what i want is simply put all my used subroutines in a sep

Re: how to include a subroutine from external file?

2002-06-23 Thread bob ackerman
start the file with: package utils;#or whatever name you want put your subroutines in the file: sub foo() # for instance { } end the file with: 1; # package should return true then in other files, to access: use utils; # at top of file and: foo(); # to acces

Re: how to include a subroutine from external file?

2002-06-23 Thread Jimmy James
then I believe the best solution (that's been discussed thus far) is probably mine: to create a "library" folder full of files that you can selectively "include" in your programs. While the answer about creating "use"-type includes is nice (and certainly handy!), it may be a bit advanced for som

Re: how to include a subroutine from external file?

2002-06-23 Thread Hytham Shehab
i think that writing a module is not my answere, i think it is a huge complicated answere for a simple question. all what i want is simply put all my used subroutines in a seperate files, then call the subroutine from that file whenever i want to use the subroutine, am i clear now? no redundency i

Re: how to include a subroutine from external file?

2002-06-23 Thread drieux
On Sunday, June 23, 2002, at 02:04 , Hytham Shehab wrote: > hi all of you, > i have a multiple perl files that use the same subroutines, the only > way > i know to handle this - i know its not so cleaver - is to copy & paste the > portion of the subroutine in all perl files i want to use it

Re: how to include a subroutine from external file?

2002-06-23 Thread J. Lundeen
If I understand what you are asking, this is how I handle it: For each program I write I have a directory structure like this: index.cgi library/ -- which is a subdirectory and contains code modules that get called by index.cgi in the "root" directory of the program. So, within my index.cg

Re: how to include a subroutine from external file?

2002-06-23 Thread J. Lundeen
I'm not sure I understand what you're asking. Please clarify. -Jimmy James Hytham Shehab wrote: > hi all of you, > i have a multiple perl files that use the same subroutines, the only way > i know to handle this - i know its not so cleaver - is to copy & paste the > portion of the subrouti

how to include a subroutine from external file?

2002-06-23 Thread Hytham Shehab
hi all of you, i have a multiple perl files that use the same subroutines, the only way i know to handle this - i know its not so cleaver - is to copy & paste the portion of the subroutine in all perl files i want to use it, what is the more clever way? thx v. much -- Hytham Shehab -- To u

Re: To Croak or Undef?

2002-06-23 Thread drieux
On Sunday, June 23, 2002, at 01:14 , Jenda Krynicky wrote: [..] > The second way is a bit safer though. If you forget to test for > errors, your script ends with an error message and the user knows > something went wrong. > If you use the first and ignore the function result everything seems > to

Re: To Croak or Undef?

2002-06-23 Thread Jenda Krynicky
From: Marco Antonio Valenzuela Escárcega <[EMAIL PROTECTED]> > On Sat, 2002-06-22 at 21:27, drieux wrote: > > > > volks, > > > > I'm playing around with a little perl module and I came > > across to different solutions - thought I would ask for > > opinions as to which would be more Kosher - so wh

Re: Perl programmer born and bred

2002-06-23 Thread Jenda Krynicky
From: "Nigel Peck" <[EMAIL PROTECTED]> > Something occured to me the other day and I'm interested to know what > people's opinions are on this list. When I'm reading the camel or > other Perl books such as Perl and XML, the majority of the humour is > related to The Hobbit, Lord of the Rings and T

Re: Perl Debuggers - was Re: Simulate `sh -x'

2002-06-23 Thread Jenda Krynicky
From: drieux <[EMAIL PROTECTED]> > On Saturday, June 22, 2002, at 05:01 , Timothy Johnson wrote: > > > Some of you out there using Win32, the Activestate Perl Dev Kit > > comes with an excellent Perl Debugger. It does allow you to step > > into and out of functions, watch variables for changes,

Re: security check

2002-06-23 Thread Ovid
--- [EMAIL PROTECTED] wrote: > I need your guys opinion. I'm thinking of having a sub ran in every sub to > check to make sure this script is being ran only through my own domain. I > think this will only break down a valid referral from > http://www.digital-drakon.com/*anything* . The only

security check

2002-06-23 Thread WyvernGod
I need your guys opinion. I'm thinking of having a sub ran in every sub to check to make sure this script is being ran only through my own domain. I think this will only break down a valid referral from http://www.digital-drakon.com/*anything* . The only thing I think I need to add is to fo

Re: Debugging the debugger

2002-06-23 Thread Harry Putnam
Peter Scott <[EMAIL PROTECTED]> writes: > print "Hello\n" > > at a debugger prompt. Yeah, it gives the same chopping action: main::(./temp:2): e strict; DB<1> print "Hello\n" H ello DB<2> Any ideas how to correct this? -- To unsubscribe, e

Re: Simulate `sh -x'

2002-06-23 Thread Peter Scott
At 06:01 AM 6/23/02 -0500, David T-G wrote: >% Would you like tracing that goes off when you go into a function? Suppose >% if you gave a numeric argument to 't' it would trace up to that depth >% in subroutine calls beneath the current level but not beneath? That >% might be doable (as a patch

Re: Debugging the debugger

2002-06-23 Thread Peter Scott
At 12:13 AM 6/23/02 -0700, Harry Putnam wrote: >Just going thru the debug tutorial: >perldoc perldebtut >Following along having writen the example script to disk. >I notice any `p' commands gives me a line with the first character >chopped off. > >Like when the tutorial gets to the part where

Re: Simulate `sh -x'

2002-06-23 Thread Peter Scott
At 10:54 PM 6/22/02 -0700, Harry Putnam wrote: >I would have thought perl would have something very similar. But I >guess its a case of perl being considerably more powerfull and >involved so the output of a `sh -x' type thing would be too extensive >to be very usefull, given the ways perl is li

Re: homemade virus scanner, is this a good method?

2002-06-23 Thread zentara
On Sat, 22 Jun 2002 16:39:07 -0700, [EMAIL PROTECTED] (John W. Krahn) wrote: >This is about ten times faster than your version. :-) > Thank you John, you saved me an afternoon of experimentation. As usual.You Rule!!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: Debug and dereferrencing a hash

2002-06-23 Thread Paul Johnson
On Sat, Jun 22, 2002 at 11:42:40PM -0500, Shawn wrote: > >>> On Sat, 2002-06-22 at 13:53, Shawn wrote: > >> > >> my %hash = (user => 1,pass => 2,thing => 3,ptr => [qw(4 5)],); > >> > >> my $hash_ref = \%hash; > >> > >> print split(/ /,%$hash_ref ), "\n"; > >> print "Not Split: ", %$hash_ref, " :\

Re: Simulate `sh -x'

2002-06-23 Thread David T-G
Peter -- ...and then Peter Scott said... % % At 01:15 PM 6/22/02 -0500, David T-G wrote: % > % >...and then Peter Scott said... % >% ... % >% Eh? The n and s commands do exactly that. See also the r command. % > % >He didn't mean the perl debgger; he meant sh -x :-) % % Oops; somehow I read "

Re: POP3 vs FTP users

2002-06-23 Thread David T-G
Jimmy -- ...and then J. Lundeen said... % % greetings, Hello! % % i'm interested to know if one can add a POP3 email account to a linux % system without actually adding a user account on the system? Well, yes and no, and part of it depends on your MTA and pop software. In theory, you can s

RE: Perl Debuggers - was Re: Simulate `sh -x'

2002-06-23 Thread Timothy Johnson
No, it's alot better. It has a look that is similar to the MSVC or VB debugging tools and allows you to step into/over, etc. I don't use it all the time, but every once in a while it can be useful. It lets you see what is happening all in one place. -Original Message- From: drieux To