Re: hash issue

2005-03-22 Thread Chris Knipe
: Allrighty The module is called from FreeRadius itself, so if : there really is nothing wrong with my code (which I suspect there : isn't), then I guess this must be moved to the FR list. But let's : rather make sure it's not the code first. To set up a test case we can assume that the w

RE: hash issue

2005-03-22 Thread Charles K. Clarkson
Chris Knipe wrote: : Allrighty The module is called from FreeRadius itself, so if : there really is nothing wrong with my code (which I suspect there : isn't), then I guess this must be moved to the FR list. But let's : rather make sure it's not the code first.

Re: hash issue

2005-03-22 Thread Chris Knipe
Allrighty The module is called from FreeRadius itself, so if there really is nothing wrong with my code (which I suspect there isn't), then I guess this must be moved to the FR list. But let's rather make sure it's not the code first. #!/usr/bin/perl

RE: hash issue

2005-03-22 Thread Charles K. Clarkson
Chris Knipe wrote: : : i.e. : $RAD_REPLY{'Recv-Limit'} = "20971520"; : $RAD_REPLY{'Xmit-Limit'} = "20971520"; : works. : $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed; : $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed; : doesn't

perlembed : makefiles on win32

2005-03-22 Thread toolscripts
I've tried following the perlembed manual example and the downloaded ExtUtils-Embed-1.14 on windows but the generated makefiles are wrong. Either they say "Expecting Rule Or Pattern found neither" or in one case it couldn't find perl.h and other headers. Using Mingw, dont have VCC, tried with

hash issue

2005-03-22 Thread Chris Knipe
Lo all, Snipette from the perl code... $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed; $RAD_REPLY{'Reply-Message'} = "You have " . $za->format_bytes($BytesAvail - $BytesUsed) . " available."; Righty. $za->format_bytes

Re: Web Service Client

2005-03-22 Thread JupiterHost.Net
Atul Vohra wrote: OUCH!!! The truth hurts sometimes :) How often do you like to do someone else's work for them for free? As he mentioned, we can help with your current efforts and problems you're coming up against. If you'd like to hire someone to do the work for you email me off list or see jo

Re: perl's awk function

2005-03-22 Thread Offer Kaye
On Tue, 22 Mar 2005 12:00:39 -0800, John W. Krahn wrote: > > HN=`perl -F: -lane'print $F[0]'` > SN=`perl -F: -lane'print $F[4]'` > Hi ubergoonz, Just a little addition to John's answer - to understand his solution, read "perldoc perlrun" from your command-line, or online at: http://perldoc.perl.

Re: Regex to remove non printable characters

2005-03-22 Thread John W. Krahn
Offer Kaye wrote: On Mon, 21 Mar 2005 12:53:36 -0800, John W. Krahn wrote: $string =~ tr/\x80-\xFF//d; No no, he can't use that - that solution is much too elegant! It will also quite probably run faster than my suggested solution! Very nice solution! Here's a variation, using the "s///" operator

Re: Web Service Client

2005-03-22 Thread Atul Vohra
OUCH!!! - Original Message - From: "Chris Devers" <[EMAIL PROTECTED]> To: "Atul Vohra" <[EMAIL PROTECTED]> Subject: Re: Web Service Client Date: Tue, 22 Mar 2005 13:30:59 -0500 (EST) > > On Tue, 22 Mar 2005, Atul Vohra wrote: > > > I was hoping somebody actually handing me code snippets

Re: perl's awk function

2005-03-22 Thread John W. Krahn
ubergoonz wrote: Hi, Hello, I am trying to read a file which is delimited with : . I only require some information in the first field, and fifth field, i can easily do it in shell script using HN=`awk -F: '{print $1}'` SN=`awk -F: '{print $5}'` I wonder how can i achieve it using perl? HN=`perl

Re: how to mail ??

2005-03-22 Thread Wiggins d'Anconia
Moon, John wrote: Moon, John wrote: [snip] Here something that I do routinely... open MAILMAN, "| rmail $To_Address"; print MAILMAN "Subject: Some subject\n"; print MAILMAN "From: $Reply_to\n\n"; print MAILMAN "some message."; close MAILMAN; And routinely it is a bad idea...please don't enco

RE: how to mail ??

2005-03-22 Thread Moon, John
Moon, John wrote: [snip] > > Here something that I do routinely... > > > open MAILMAN, "| rmail $To_Address"; > print MAILMAN "Subject: Some subject\n"; > print MAILMAN "From: $Reply_to\n\n"; > print MAILMAN "some message."; > close MAILMAN; > > And routinely it is a bad idea...please d

Re: how to mail ??

2005-03-22 Thread Wiggins d'Anconia
Moon, John wrote: [snip] Here something that I do routinely... open MAILMAN, "| rmail $To_Address"; print MAILMAN "Subject: Some subject\n"; print MAILMAN "From: $Reply_to\n\n"; print MAILMAN "some message."; close MAILMAN; And routinely it is a bad idea...please don't encourage its use here.

RE: how to mail ??

2005-03-22 Thread Moon, John
Subject: how to mail ?? #!/usr/bin/perl foreach (`df -h|grep /dev/hda11`) { split(); # our $total = $_[1]; # our $used = $_[2]; our $free = $_[3]; if ($free =~ /M/){ $free=~ s/M//; print $free."\n"; if ($free <= 10)

Re: how to mail ??

2005-03-22 Thread Jay Savage
On Tue, 22 Mar 2005 17:46:30 +, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > #!/usr/bin/perl > > foreach (`df -h|grep /dev/hda11`) { > split(); > # our $total = $_[1]; > # our $used = $_[2]; > our $free = $_[3]; > if ($free =~ /M/){ > $free=~ s/

Re: Web Service Client

2005-03-22 Thread Chris Devers
On Tue, 22 Mar 2005, Atul Vohra wrote: > I was hoping somebody actually handing me code snippets :-) Keep hoping then. This list is not a script writing service. You were pointed towards a CPAN search for SOAP modules; the documentation for most or all of these will include code. Look there,

Re: how to mail ??

2005-03-22 Thread Wiggins d'Anconia
Saurabh Singhvi wrote: #!/usr/bin/perl foreach (`df -h|grep /dev/hda11`) { split(); # our $total = $_[1]; # our $used = $_[2]; our $free = $_[3]; if ($free =~ /M/){ $free=~ s/M//; print $free."\n"; if ($free <= 10) {

how to mail ??

2005-03-22 Thread Saurabh Singhvi
#!/usr/bin/perl foreach (`df -h|grep /dev/hda11`) { split(); # our $total = $_[1]; # our $used = $_[2]; our $free = $_[3]; if ($free =~ /M/){ $free=~ s/M//; print $free."\n"; if ($free <= 10) {

Re: lwp beginner question

2005-03-22 Thread Steven Schubiger
On 22 Mar, "José J. Cintrón" wrote: > The script works fine as long as I'm not behind a proxy. As soon as I > get the script behind the proxy where it will reside it ends with a 500 > Exit code. Anyone can provide me any info on how to get the script > working behind a proxy? You may conside

Re: Web Service Client

2005-03-22 Thread Atul Vohra
I was hoping somebody actually handing me code snippets :-) Atul - Original Message - From: "Jay Savage" <[EMAIL PROTECTED]> To: "Atul Vohra" <[EMAIL PROTECTED]>, beginners@perl.org Subject: Re: Web Service Client Date: Tue, 22 Mar 2005 11:41:58 -0500 > > On Tue, 22 Mar 2005 08:27:35 -08

Re: Web Service Client

2005-03-22 Thread Jay Savage
On Tue, 22 Mar 2005 08:27:35 -0800, Atul Vohra <[EMAIL PROTECTED]> wrote: > Hi, > > Does anybody have a Web Service client in perl (SOAP stuff) to consume a Web > Service. > I have created Web Services using Remedy (ARS) and now need to write a cleint > for the external customer. > > Any help w

lwp beginner question

2005-03-22 Thread José J. Cintrón
I'm sure it's a stupid question that has been asked before (probably a few 1000 times), but here it goes any way... I have a script that downloads a file from an ftp site see bellow use strict; # --- Customize here --- my $url = ftp://ftp.server.com/path/";; my $file = "c:\\download\

Web Service Client

2005-03-22 Thread Atul Vohra
Hi, Does anybody have a Web Service client in perl (SOAP stuff) to consume a Web Service. I have created Web Services using Remedy (ARS) and now need to write a cleint for the external customer. Any help will be appreciated. Thanks Atul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: perl's awk function

2005-03-22 Thread Jay Savage
On Wed, 23 Mar 2005 00:21:47 +0800, ubergoonz <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to read a file which is delimited with : . > > I only require some information in the first field, and fifth field, > > i can easily do it in shell script using > HN=`awk -F: '{print $1}'` > SN=`awk -F

perl's awk function

2005-03-22 Thread ubergoonz
Hi, I am trying to read a file which is delimited with : . I only require some information in the first field, and fifth field, i can easily do it in shell script using HN=`awk -F: '{print $1}'` SN=`awk -F: '{print $5}'` I wonder how can i achieve it using perl? -- To unsubscribe, e-mail: [

SFTP problems...

2005-03-22 Thread Ing. Branislav Gerzo
Hello beginners@perl.org, I just install Net::SFTP on my machine via PPM (randy kobes repository), and ran this code: #!/usr/bin/perl -w use strict; use warnings; use Net::SFTP; my $host = '11.11.111.11'; my $user = 'root'; my $pass = '*'; my $sftp = Net::SFTP->new($host,user=>$use

Re: Needs some guidance to start

2005-03-22 Thread Steven Schubiger
On 22 Mar, Chandrakant Reddy wrote: > I wanted to develop an application using which an administrator Eww, could you please rephrase this sentence; frankly, I don't grasp the contextual meaning of "using" here. > can know what are the software installed on the machines on his LAN Something s

Re: Needs some guidance to start

2005-03-22 Thread Chris Devers
On Tue, 22 Mar 2005, Chandrakant Reddy wrote: > I wanted to develop an application using which an administrator can > know what are the software installed on the machines on his LAN and > also the configuration details of the desktop machines (like cpu, > number of processors and their serial n

Needs some guidance to start

2005-03-22 Thread Chandrakant Reddy
Hi I wanted to develop an application using which an administrator can know what are the software installed on the machines on his LAN and also the configuration details of the desktop machines (like cpu, number of processors and their serial numbers). I don't know how to start, what are api's a

Re: Perl Analyzing Maillog

2005-03-22 Thread Offer Kaye
On Tue, 22 Mar 2005 11:47:31 +, Nick Chettle wrote: > > My Regex: > > ([A-Z1-9]{8}) > [...snip...] > I was expecting it to match "291E2130". > Well, you have a zero ("0") as the 8th char, but your regexp only matches the numbers 1-9, so it can hardly match, now can it? ;-) -- Offer Kay

Re: Regex to remove non printable characters

2005-03-22 Thread Chris Devers
On Tue, 22 Mar 2005, Offer Kaye wrote: > On Mon, 21 Mar 2005 12:53:36 -0800, John W. Krahn wrote: > > > $string =~ tr/\x80-\xFF//d; > > Very nice solution! Here's a variation, using the "s///" operator: > $string =~ s/[\x80-\xFF]//g; If you benchmark it, I suspect the tr/// version will be muc

Re: Regex to remove non printable characters

2005-03-22 Thread Offer Kaye
On Mon, 21 Mar 2005 12:53:36 -0800, John W. Krahn wrote: > > $string =~ tr/\x80-\xFF//d; > No no, he can't use that - that solution is much too elegant! It will also quite probably run faster than my suggested solution! Very nice solution! Here's a variation, using the "s///" operator: $strin

RE: How to read and delete mail from a cron job

2005-03-22 Thread Moon, John
> Chris, > > Thank you for the suggestion but when I say "process" I mean that I need to > read the "reply", grep for user id and a confirmation number, update my > database to say that the email I send was "replied to" as requested, and > that the email address I was given was correct... I am reg

Re: Perl Analyzing Maillog

2005-03-22 Thread Nick Chettle
Wagner, David --- Senior Programmer Analyst --- WGO wrote: I took a quick look at some of the earlier emails and Charles Clarkson's email is what you are after. Using the push on your hash to create the array. You're quite right, it does. I was testing it and was getting the same result as with