Re: encrypting email address (to prevent spam)

2003-12-17 Thread Jeff Westman
"Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > > "Sara" == Sara <[EMAIL PROTECTED]> writes: > > Sara> I am looking for a way to encrypt & decrypt an email addy to > Sara> prevent spam while posting a message to discussion board. > > You also asked this, and I answered it, on the Perl Beg

Re: Line by line

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 7:28 PM, PerlDiscuss - Perl Newsgroups and mailing lists wrote: Hi, I have a file extremely large in size and length. I want to read the file line by line and worry about matching up each line and running that line through a subroutine instead of opening the entire file (whi

Re: Term:ANSIColor and negative numbers

2003-12-17 Thread Andrew Gaffney
(William) Wenjie Wang wrote: -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 December 2003 4:41 AM To: James Edward Gray II; Steve Massey Cc: [EMAIL PROTECTED] Subject: RE: Term:ANSIColor and negative numbers James Ed

Line by line

2003-12-17 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I have a file extremely large in size and length. I want to read the file line by line and worry about matching up each line and running that line through a subroutine instead of opening the entire file (which would take a while). So how do I open a file up and process each line individually?

RE: Term:ANSIColor and negative numbers

2003-12-17 Thread \(William\) Wenjie Wang
>-Original Message- >From: Wagner, David --- Senior Programmer Analyst --- WGO >[mailto:[EMAIL PROTECTED] >Sent: Thursday, 18 December 2003 4:41 AM >To: James Edward Gray II; Steve Massey >Cc: [EMAIL PROTECTED] >Subject: RE: Term:ANSIColor and negative numbers > > >James Edward Gray II wrot

Re: RE : RE : Regular expressions

2003-12-17 Thread John W. Krahn
Steve Hemond wrote: > > I think I begin to understand... > > I begin by fetching the results of the ps -efA command and split it > into many variables ($uid, $pid, etc.) > > open(PS, "ps -efA|"); You should _ALWAYS_ verify that the file opened correctly! > while () { > ($uid,$

Re: silly qn,.

2003-12-17 Thread drieux
On Dec 17, 2003, at 11:45 AM, Dan Anderson wrote: On Thu, 2003-12-18 at 06:03, Ajey wrote: hi, how can i find which perl modules are installed on linux os? Well Linux distributions differ in what they install, and even then you can install or uninstall or change what modules are installed yourself

Re: Nevermind WAs: Re: Problems with Inheritance in GD::Graph

2003-12-17 Thread drieux
On Dec 17, 2003, at 11:06 AM, Dan Anderson wrote: Nevermind. I'm an idiot. I fogot to use GD::Graph::bars. :: hits head against wall:: Minor technical nit, you should hire a professional hitPerKin to do that... Respect the Guild System!!! major dumb question, but was the error message "unabl

Re: silly qn,.

2003-12-17 Thread Dan Anderson
On Thu, 2003-12-18 at 06:03, Ajey wrote: > hi, > how can i find which perl modules are installed on linux os? Well Linux distributions differ in what they install, and even then you can install or uninstall or change what modules are installed yourself, so pretty much you're never guaranteed that

RE : RE : RE : Regular expressions

2003-12-17 Thread Hemond, Steve
drieux is right about me being exploring Perl. In fact, that is a good exercice to play with regular expressions and data types as I had to build a hash of hashes to do the thing. However, I wouldn't let a script in that stat if I knew of a better/quicker/shorter method. I will then have to i

RE: Problems with Inheritance in GD::Graph

2003-12-17 Thread Dan Anderson
On Wed, 2003-12-17 at 14:04, Ed Christian wrote: > Dan Anderson wrote: > > I am trying out GD::Graph, which is a CPAN module that creates a > > method new, and then for each graph type inherits that new method (I > > think -- I had to open the code). > > > > So I tried calling: > > > > my $grap

Nevermind WAs: Re: Problems with Inheritance in GD::Graph

2003-12-17 Thread Dan Anderson
Nevermind. I'm an idiot. I fogot to use GD::Graph::bars. :: hits head against wall:: Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Problems with Inheritance in GD::Graph

2003-12-17 Thread Bob Showalter
Dan Anderson wrote: > I am trying out GD::Graph, which is a CPAN module that > creates a method > new, and then for each graph type inherits that new method (I > think -- I > had to open the code). > > So I tried calling: > > my $graph = GD::Graph::bars->new(400, 600); > > And I get the error: >

RE: Problems with Inheritance in GD::Graph

2003-12-17 Thread Ed Christian
Dan Anderson wrote: > I am trying out GD::Graph, which is a CPAN module that creates a > method new, and then for each graph type inherits that new method (I > think -- I had to open the code). > > So I tried calling: > > my $graph = GD::Graph::bars->new(400, 600); > > And I get the error: >

Re: RE : RE : Regular expressions

2003-12-17 Thread drieux
On Dec 17, 2003, at 10:40 AM, Wiggins d Anconia wrote: [..] Ah! And now we have come full circle back to "Why you should use a module to handle this type of code rather than re-inventing the wheel!" [..] technically I agree with you. In terms of code re-use and code maintainability. So it so

silly qn,.

2003-12-17 Thread Ajey
hi, how can i find which perl modules are installed on linux os? regds -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Problems with Inheritance in GD::Graph

2003-12-17 Thread Dan Anderson
I am trying out GD::Graph, which is a CPAN module that creates a method new, and then for each graph type inherits that new method (I think -- I had to open the code). So I tried calling: my $graph = GD::Graph::bars->new(400, 600); And I get the error: Can't locate object method "new" via pac

Re: Term:ANSIColor and negative numbers

2003-12-17 Thread Wiggins d Anconia
> Hi All > > using Term:ANSIColor - does anyone know if it's possible ( or maybe I mean > practical) to print out negative numbers in say RED, at the same time > ensuring the original value is retained. > > so if value is -16 the it should print 16 in RED text otherwise leave it > alone. > Sinc

RE : RE : RE : RE : Regular expressions

2003-12-17 Thread Hemond, Steve
No worries :-) It works now, thanks a lot :-) Best regards, Steve Hemond Programmeur Analyste / Analyst Programmer Smurfit-Stone, Ressources Forestières La Tuque, P.Q. Tel.: (819) 676-8100 X2833 [EMAIL PROTECTED] > -Original Message- > From: drieux [mailto:[EMAIL PROTECTED] > Sen

Re: Term:ANSIColor and negative numbers

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 11:41 AM, Wagner, David --- Senior Programmer Analyst --- WGO wrote: How do you get it to actually do the color? I use both std command( w2k) and older version os MKS Korn shell and all I get is numbers. Never understood how one actually gets the colors etc. What does one

Re: RE : RE : Regular expressions

2003-12-17 Thread Wiggins d Anconia
> I think I begin to understand... > > I begin by fetching the results of the ps -efA command and split it into many variables ($uid, $pid, etc.) > > open(PS, "ps -efA|"); > while () { > ($uid,$pid,$ppid,$c,$stime,$tty,$time,$cmd) = split; > > if ($cmd =~ /dispatc

Re: RE : RE : RE : Regular expressions

2003-12-17 Thread drieux
On Dec 17, 2003, at 10:24 AM, drieux wrote: open(PS, "ps -efA|") or die "unable to open ps command\n:$!"; while () { ($uid,$pid,$ppid,$c,$stime,$tty,$time,$cmd) = split; print "$pid -> $cmd\n"; } close(PS); Tell me not to make my coffee with

RE : RE : RE : RE : Regular expressions

2003-12-17 Thread Hemond, Steve
Here is a sample of what your piece of code returns on my Aix box. 44520 -> /prog/gena/8.1.1/bin/dispatch 44650 -> reproject 45176 -> aioserver 45432 -> aioserver 45724 -> -ksh 46002 -> /bin/bsh 46232 -> /usr/dt/bin/dtterm 46584 -> /usr/bin/ksh 46820 -> /usr/dt/bin/ttsession 47060 -> /bin/bsh 4730

Re: RE : RE : RE : Regular expressions

2003-12-17 Thread drieux
On Dec 17, 2003, at 10:16 AM, Hemond, Steve wrote: I am issuing this command on an Aix box and running allright :-) interesting, let's do a quick piece of test code open(PS, "ps -efA|") or die "unable to open ps command\n:$!"; while () { ($uid,$pid,$ppid,$c,$stime,$tt

RE : RE : RE : Regular expressions

2003-12-17 Thread Hemond, Steve
I am issuing this command on an Aix box and running allright :-) Forgive my curiosity.. are you running Solaris on a x86 box? Steve Hemond Programmeur Analyste / Analyst Programmer Smurfit-Stone, Ressources Forestières La Tuque, P.Q. Tel.: (819) 676-8100 X2833 [EMAIL PROTECTED] > -Origi

Re: RE : RE : Regular expressions

2003-12-17 Thread drieux
On Dec 17, 2003, at 8:47 AM, Hemond, Steve wrote: [..] open(PS, "ps -efA|"); while () { ($uid,$pid,$ppid,$c,$stime,$tty,$time,$cmd) = split; [..] forgive me if I presume that you are running on some version of Linux? ( because by BSD boxes do not like the "A" and my Solaris box wou

Re: Please help me! Thanks.

2003-12-17 Thread drieux
On Dec 17, 2003, at 9:36 AM, Randal L. Schwartz wrote: "Drieux" == Drieux <[EMAIL PROTECTED]> writes: Drieux> neat solution, minor problem is that Math::Fraction Drieux> is not a 'default' module yet. And if that's a problem for you, you aren't using Perl properly yet. could well be. help clarify

Re: Term:ANSIColor and negative numbers

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 11:42 AM, Steve Massey wrote: Nice one James - that does it ..!! Happy to help. something more to learn - abs perldoc -f abs many thanks.. Anytime. James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Term:ANSIColor and negative numbers

2003-12-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
James Edward Gray II wrote: > On Dec 17, 2003, at 11:25 AM, Steve Massey wrote: > >> Hi All >> >> using Term:ANSIColor - does anyone know if it's possible ( or maybe >> I mean practical) to print out negative numbers in say RED, at the >> same time ensuring the original value is retained. >> >>

RE: Term:ANSIColor and negative numbers

2003-12-17 Thread Steve Massey
Nice one James - that does it ..!! something more to learn - abs many thanks.. -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 17:35 To: Steve Massey Cc: [EMAIL PROTECTED] Subject: Re: Term:ANSIColor and negative numbers On Dec 17, 2003,

Re: Please help me! Thanks.

2003-12-17 Thread Randal L. Schwartz
> "Drieux" == Drieux <[EMAIL PROTECTED]> writes: Drieux> neat solution, minor problem is that Math::Fraction Drieux> is not a 'default' module yet. And if that's a problem for you, you aren't using Perl properly yet. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777

Re: How do you build your HTML?

2003-12-17 Thread Randal L. Schwartz
> "Chris" == Chris Ward <[EMAIL PROTECTED]> writes: Chris> I recommend http://www.template-toolkit.org/. Just print out the Chris> documentation so it's on hand and your guarenteed on you way to creating some Chris> cool ass stuff. Basically it's embedded perl inside HTMLbut you if you

Re: Term:ANSIColor and negative numbers

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 11:25 AM, Steve Massey wrote: Hi All using Term:ANSIColor - does anyone know if it's possible ( or maybe I mean practical) to print out negative numbers in say RED, at the same time ensuring the original value is retained. so if value is -16 the it should print 16 in RED tex

Term:ANSIColor and negative numbers

2003-12-17 Thread Steve Massey
Hi All using Term:ANSIColor - does anyone know if it's possible ( or maybe I mean practical) to print out negative numbers in say RED, at the same time ensuring the original value is retained. so if value is -16 the it should print 16 in RED text otherwise leave it alone. Thanks in advance Stev

Re: Bug reports for standard modules/Net::FTP STOU

2003-12-17 Thread Wiggins d Anconia
> On Wed, 2003-12-17 at 11:40, Wiggins d Anconia wrote: > > Real Question: > > I have a potential bug/implementation request for Net::FTP, as it is a > > base module should this be sent directly to Graham Barr or is there a > > better place to send it? > > I send bug reports through the Request

Re: Bug reports for standard modules/Net::FTP STOU

2003-12-17 Thread Kevin Old
On Wed, 2003-12-17 at 11:40, Wiggins d Anconia wrote: > Real Question: > I have a potential bug/implementation request for Net::FTP, as it is a > base module should this be sent directly to Graham Barr or is there a > better place to send it? I send bug reports through the Request Tracker at CPAN

Re: Bug reports for standard modules/Net::FTP STOU

2003-12-17 Thread Randy W. Sims
On 12/17/2003 11:40 AM, Wiggins d Anconia wrote: Real Question: I have a potential bug/implementation request for Net::FTP, as it is a base module should this be sent directly to Graham Barr or is there a better place to send it? I usually check for a mailing list first at .

RE : RE : Regular expressions

2003-12-17 Thread Hemond, Steve
I think I begin to understand... I begin by fetching the results of the ps -efA command and split it into many variables ($uid, $pid, etc.) open(PS, "ps -efA|"); while () { ($uid,$pid,$ppid,$c,$stime,$tty,$time,$cmd) = split; if ($cmd =~ /dispatch genie/) {

RE: RE : Regular expressions

2003-12-17 Thread Ed Christian
Hemond, Steve wrote: > Okay, here`s the real problem, > > # ps -efA |grep dispatch > cspenard 33958 45716 0 09:08:05 pts/8 0:00 > /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena/impress/gui/im > msirois 37212 9842 0 08:41:17 pts/1 0:04 > /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena

Bug reports for standard modules/Net::FTP STOU

2003-12-17 Thread Wiggins d Anconia
Real Question: I have a potential bug/implementation request for Net::FTP, as it is a base module should this be sent directly to Graham Barr or is there a better place to send it? Background Questions: Out of curiousity does anyone know of discussions had about Net::FTP as it relates to the STOU

Re: RE : Regular expressions

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 10:29 AM, Hemond, Steve wrote: Okay, here`s the real problem, # ps -efA |grep dispatch cspenard 33958 45716 0 09:08:05 pts/8 0:00 /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena/impress/gui/im msirois 37212 9842 0 08:41:17 pts/1 0:04 /prog/gena/8.1.1/bin/dispatch

RE : Regular expressions

2003-12-17 Thread Hemond, Steve
Okay, here`s the real problem, # ps -efA |grep dispatch cspenard 33958 45716 0 09:08:05 pts/8 0:00 /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena/impress/gui/im msirois 37212 9842 0 08:41:17 pts/1 0:04 /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena/impress/gui/im My script pass

Re: Regular expressions

2003-12-17 Thread drieux
On Dec 17, 2003, at 7:59 AM, Hemond, Steve wrote: [..] I am searching this way : if ($text =~ /one two/) What I am doing wrong? ok, I bite, what is the problem? given #!/usr/bin/perl -w use strict; while ( ) { my $text = $_; if ($te

Re: get rid of whitespace around pipes??

2003-12-17 Thread Jeff 'japhy' Pinyan
On Dec 17, LoneWolf said: >I am parsing a massive file line by line and cleaning it up. It has about >15 fields, all separated by | and I want to remove the white space from >before and after the pipes so that as the information is parsed it gets rid >of external white spaces from the string and

Re: get rid of whitespace around pipes??

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 10:26 AM, LoneWolf wrote: I am parsing a massive file line by line and cleaning it up. It has about 15 fields, all separated by | and I want to remove the white space from before and after the pipes so that as the information is parsed it gets rid of external white spaces fr

Re: get rid of whitespace around pipes??

2003-12-17 Thread Randy W. Sims
On 12/17/2003 11:26 AM, LoneWolf wrote: I am parsing a massive file line by line and cleaning it up. It has about 15 fields, all separated by | and I want to remove the white space from before and after the pipes so that as the information is parsed it gets rid of external white spaces from the s

Re: RE : Regular expressions

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 10:09 AM, Hemond, Steve wrote: Actually, I have to test two conditions to get into a block, If the strings found are either "one two" or "two three", go ahead. if ($text =~ /one two/ or /two three/) Now that is a mistake. ;) if ($text =~ /\bone two\b/ || $text =~ /\btwo thr

Re: RE : Regular expressions

2003-12-17 Thread Jeff 'japhy' Pinyan
On Dec 17, Hemond, Steve said: >Actually, I have to test two conditions to get into a block, > >If the strings found are either "one two" or "two three", go ahead. > >if ($text =~ /one two/ or /two three/) That code is the same as if (($text =~ /one two/) or ($_ =~ /two three/)) { ... } You w

get rid of whitespace around pipes??

2003-12-17 Thread LoneWolf
I am parsing a massive file line by line and cleaning it up. It has about 15 fields, all separated by | and I want to remove the white space from before and after the pipes so that as the information is parsed it gets rid of external white spaces from the string and such. Some fields are number

RE : Regular expressions

2003-12-17 Thread Hemond, Steve
Actually, I have to test two conditions to get into a block, If the strings found are either "one two" or "two three", go ahead. if ($text =~ /one two/ or /two three/) Steve Hemond Programmeur Analyste / Analyst Programmer Smurfit-Stone, Ressources Forestières La Tuque, P.Q. Tel.: (819) 676-8100

Re: Regular expressions

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 9:59 AM, Hemond, Steve wrote: Hi again, I want to make a search on two words. If 'one two' is found, it is okay. If 'one' is found, it is incorrect. If 'two' is found, it is also incorrect. I want the search to return me occurences of 'one two' found together. I am searching

Re: Users executing perl scripts

2003-12-17 Thread drieux
On Dec 17, 2003, at 6:20 AM, Paul Kraus wrote: [..] Create a symbolic link in usr/local/bin with the filename you want them to use. Of the group, paul's is the most pragmatic, IMMHO, since this can be done in the classical ln -s /opt/WidgetSnack/bin/fooBar.pl /usr/local/bin/fooBar for each of the

Regular expressions

2003-12-17 Thread Hemond, Steve
Hi again, I want to make a search on two words. If 'one two' is found, it is okay. If 'one' is found, it is incorrect. If 'two' is found, it is also incorrect. I want the search to return me occurences of 'one two' found together. I am searching this way : if ($text =~ /one two/) What I am do

RE: Users executing perl scripts

2003-12-17 Thread Paul Kraus
Create a symbolic link in usr/local/bin with the filename you want them to use. > -Original Message- > From: Hemond, Steve [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 17, 2003 9:11 AM > To: [EMAIL PROTECTED] > Subject: Users executing perl scripts > > > Hi people, > > I have

Re: Users executing perl scripts

2003-12-17 Thread James Edward Gray II
On Dec 17, 2003, at 8:10 AM, Hemond, Steve wrote: Hi people, I have finished some little perl scripts that gives basic infos to my users. I want to make these perl scripts available to all users (so I would probably put them in /usr/local/bin). However, my perl scripts has the .pl extension, and

RE: Users executing perl scripts

2003-12-17 Thread Steven Kreuzer
Create symlinks to the perl scripts and place the links into a directory in their $PATH Example: $ ln -s /usr/bin/scripts/somescript.pl /bin/somescript Steven Kreuzer Linux Systems Administrator Etagon, Inc W: 646.728.0656 F: 646.728.0607 E: [EMAIL PROTECTED] -Original Message- From: H

Users executing perl scripts

2003-12-17 Thread Hemond, Steve
Hi people, I have finished some little perl scripts that gives basic infos to my users. I want to make these perl scripts available to all users (so I would probably put them in /usr/local/bin). However, my perl scripts has the .pl extension, and I would like them to keep this extension for findi

Re: Converting using a hash

2003-12-17 Thread Jeff 'japhy' Pinyan
On Dec 17, Jan Eden said: >thanks a lot for all the responses. Jeff's explanation of the snippet I >mentioned in my original message did the trick. The hash-based solution >is much faster now, although the first attempt (using multiple >replacements on standard input) is still the fastest. Well,

Re: using Data::Page

2003-12-17 Thread Rob Dixon
Ramprasad A Padmanabhan > > I need to show users from a ldap database. Since there are many ( > thousands ) of users , I want to show them page by page. > I just installed Data::Page , But there seems to be no direct example on > how to use it. Can anyone just send me a link to an example. Hi Ram.

Perl help needed LWP

2003-12-17 Thread Saleem Mukhtar
Hello, I am trying to use the Perl LWP and HTTP modules to communicate with the eBay API but I get the following message 500 Can't connect to api-test.ebay.com:443 (Bad protocol 'tcp') Can someone help?? I am including some code below -- I have blanked out userids and passwords. Please respo

using Data::Page

2003-12-17 Thread Ramprasad A Padmanabhan
Hi I need to show users from a ldap database. Since there are many ( thousands ) of users , I want to show them page by page. I just installed Data::Page , But there seems to be no direct example on how to use it. Can anyone just send me a link to an example. Thanks Ram -- To unsubscribe, e-mail

Re: Converting using a hash

2003-12-17 Thread Jan Eden
Hi all, thanks a lot for all the responses. Jeff's explanation of the snippet I mentioned in my original message did the trick. The hash-based solution is much faster now, although the first attempt (using multiple replacements on standard input) is still the fastest. To answer John's question