Re: Portable unix du command

2003-11-19 Thread R. Joseph Newton
david wrote: > Dan Muey wrote: > > try Filesys::DiskFree > > #!/usr/bin/perl -w > use strict; > > use Filesys::DiskFree; > > my $h = Filesys::DiskFree->new; > > $h->df; > $h->device('/usr'); > > print "/usr has ",$h->avail('/usr')," bytes available\n"; > > __END__ > > prints: > > /usr has

RE: Strange characters

2003-11-19 Thread chetak.sasalu
Hi , I installed Pod-Perldoc-3.12 and the latest version of perldoc but the problem remains. Why does this happen ? Chetak. BTW what does HTH stand for? I see it used in this group a lot! -Original Message- From: Viren Konde [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2

RE: Grep on a ms word document

2003-11-19 Thread chetak.sasalu
Hi Rob, If I want to do a search replace on all the MS doc files in a directory then the method you suggested would be cumbersome. This is what I read about powergrep. http://www.powergrep.com/replace.html The basic

Re: Rephrasing the Question

2003-11-19 Thread R. Joseph Newton
Jason Dusek wrote: > I need to write a script that finds the uniq() function in code for a > data manipulation language, and replaces it with hyd_uniq(). Here are > some examples: > > amend: u= uniq( timetags.bin_start, s ) > to: u= hyd_uniq( timetags.bin_start, s ) > > s/\(u

RE: matching query.

2003-11-19 Thread chetak.sasalu
Steve*2 A small correction if ($source =~ /^\b$help\b/) chetak -Original Message- From: Steve Mayer [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 3:01 AM To: Steve Massey Cc: [EMAIL PROTECTED] Subject: Re: matching query. Steve, Change your regular expression to:

how to do unset LANG in my program

2003-11-19 Thread Ramprasad A Padmanabhan
I have a program that writes into a LDAP server using Net::LDAP that did not work. After wasting 2 days I ultimately found out that th LANG environment variable on my box ( Redhat 9.0 ) was creating the problem. If I do a unset LANG ; /path/myscript.pl , then the program works fine But if

Perl optimization tools

2003-11-19 Thread EUROSPACE SZARINDAR
Hi all, Are there tools like in C (lint, gconv, gprof) to know a little more about the perl execution. What could be very usefull : nb of times a subroutine is executed, time spent per sub, memory usage, Before rewriting a perl program into C better knowing where the time is wasted and

mail auto delete from POP server

2003-11-19 Thread Ramprasad A Padmanabhan
I would like to write a program that deletes all mails from my popserver which are older than 'n' days Is there a script available already. If I were to write a script using Mail::POP3Client , I would have to fetch the headers of all mails and the parse mail headers Is there no module that can

Re: Perl optimization tools

2003-11-19 Thread Jeff 'japhy' Pinyan
On Nov 19, EUROSPACE SZARINDAR said: >Are there tools like in C (lint, gconv, gprof) to know a little more about >the perl execution. > >What could be very usefull : >nb of times a subroutine is executed, >time spent per sub, >memory usage, You want the Devel::DProf module. It gives you spe

Re: pagination of dbi results on html browser

2003-11-19 Thread A L
Thank you for your insights and suggestions. Somethings that you have mentioned, such as my approach to problem solving, had been resolved. Hence, my resolution to master Perl is stronger than before. Obviously, there are plenty of things that I have to work on, but I'm hoping my persistence

Re: Strange characters

2003-11-19 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > Hi , > > I installed Pod-Perldoc-3.12 and the latest version of perldoc but the > problem remains. > Why does this happen ? > > Chetak. Are you trying to open perldoc to read? If so, that is not the way it was meant to be used. The perldoc utility is an executabl

Re: matching query.

2003-11-19 Thread Tore Aursand
On Tue, 18 Nov 2003 21:22:07 +, Steve Massey wrote: > I want to match Help > > Help ## match this > Helps## not match this > > I am using syntax below, but it's not working > > $help = "Help"; > > if ($source =~ /^$help/) Do you really need to use a regular expression to do this?

Re: mail auto delete from POP server

2003-11-19 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: > > I would like to write a program that deletes all mails from my popserver > which are older than 'n' days > > Is there a script available already. If I were to write a script using > Mail::POP3Client , I would have to fetch the headers of all mails and > the pa

RE: pagination of dbi results on html browser

2003-11-19 Thread Dan Muey
> Thank you for your insights and suggestions. Somethings that > you have mentioned, such as my approach to problem solving, > had been resolved. Hence, my resolution to master Perl is > stronger than before. Obviously, there are plenty of things > that I have to work on, but I'm hoping my p

pydoc-like tool to generate html from uncommented perl cgi source code

2003-11-19 Thread Jeff Kowalczyk
I'm trying to find a simple tool to run over a CGI perl application and output hyperlinked index of source code at the function level, preferably syntax-colored. None of the files are formally commented at this point, so tools like NaturalDocs are not going to give anything back. robodoc isn't out

Re: Fedora and Findmodules Script

2003-11-19 Thread Kevin Old
On Tue, 2003-11-18 at 21:55, Clint wrote: > I upgraded a RH9 machine to Fedora, and now the script I used to use for > determing what CPAN modules are on my machine will not report anything > but Perl. That is, I know I have many modules on the machine, but the > script is not reporting them. I

Re: how to do unset LANG in my program

2003-11-19 Thread Casey West
It was Wednesday, November 19, 2003 when Ramprasad A Padmanabhan took the soap box, saying: : I have a program that writes into a LDAP server using Net::LDAP that did : not work. : : After wasting 2 days I ultimately found out that th LANG environment : variable on my box ( Redhat 9.0 ) was cre

Re: matching query.

2003-11-19 Thread Steve Mayer
Chetak, Whoops! Thanks for catching that! Steve On Wed, Nov 19, 2003 at 01:37:33PM +0530, [EMAIL PROTECTED] wrote: > > Steve*2 > > A small correction if ($source =~ /^\b$help\b/) > > chetak > -Original Message- > From: Steve Mayer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, Nov

RE: pydoc-like tool to generate html from uncommented perl cgi so urce code

2003-11-19 Thread Roberts Mr Richard L
anyone know anything about installing ModSurvey? thanks in advance Richard -Original Message- From: Jeff Kowalczyk [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 11:14 AM To: [EMAIL PROTECTED] Subject: pydoc-like tool to generate html from uncommented perl cgi source code

Re: Strange characters

2003-11-19 Thread James Edward Gray II
On Nov 19, 2003, at 1:19 AM, <[EMAIL PROTECTED]> wrote: BTW what does HTH stand for? I see it used in this group a lot! It stands for "Hope that helps". James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: pagination of dbi results on html browser

2003-11-19 Thread James Edward Gray II
On Nov 18, 2003, at 6:12 AM, A L wrote: ###My background... Well, I had my first encounter with Perl in the Fall of 2000. It was not pretty. Ironically, this was pretty much how my first experience with Perl went, years ago now. I swore I would never touch that crazy "rules for the exception

Re: mail auto delete from POP server

2003-11-19 Thread Daniel Staal
--As off Wednesday, November 19, 2003 7:42 PM +0530, Ramprasad A Padmanabhan is alleged to have said: I would like to write a program that deletes all mails from my popserver which are older than 'n' days Is there a script available already. If I were to write a script using Mail::POP3Client ,

Re: pagination of dbi results on html browser

2003-11-19 Thread
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (R. Joseph Newton) writes: >Jeff 'japhy' Pinyan wrote: > >> >> The way I've done this is: >> >> use DBI; >> use CGI 'param'; >> >> my $dbh = DBI->connect($dsn, $username, $password, { RaiseError => 1 }); >> my $offset = param('offset') || 0

Pattern Matching

2003-11-19 Thread Rob
Hi, I'm trying to find out how many newline characters are in a string. I thought there would be a simple function for this, but I can't find it; Do I need to step through the string a character at a time to check this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Is it possible to send / receive cookies on an image

2003-11-19 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dan Anderson) writes: >Is it possible to create a perl script that would send to the user an >image and cookies. Depending on the cookie on the users computer, the >user would get a certain picture. > >I figure I would have to use CGI, but what

PPM Repositories

2003-11-19 Thread Paul Kraus
Anyone know of any current repositories. Ones that have most of cpan? I am trying to find these modules. So that I can use www::mechanize to attach to https servers. Currently they only return error 501. Thanks! Windows xp pro active state perl Why doesn't this work? Why don't https:// URL

Portability

2003-11-19 Thread yomna el-tawil
Hi all, I want to know from where can i start making a GUI, i don't think it is the same way as writing code, as u adviced me from "printing hello world". Secondly, I wanted to ask if the Perl and bioperl are portable, i mean, if they are not installed, is it possible to run an appliocation impleme

RE: Portability

2003-11-19 Thread Paul Kraus
Look into TK and perl2exe. -Original Message- From: yomna el-tawil [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 1:48 PM To: Beginners Perl Subject: Portability Hi all, I want to know from where can i start making a GUI, i don't think it is the same way as writing code, a

RE: Portability

2003-11-19 Thread Ned Cunningham
Yes use Tk module. Very involved learning curve. Perlapp from the Perl Development Kit creates as a default, a "stand alone" application. HTH Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310 [EMAIL PROTECTED]

Re: Pattern Matching

2003-11-19 Thread Damon Allen DAVISON
On Wed, Nov 19, 2003 at 01:33:25PM -0500, Rob wrote: > Hi, I'm trying to find out how many newline characters are in a string. I > thought there would be a simple function for this, but I can't find it; > Do I need to step through the string a character at a time to check this? Here is an example

RE: Pattern Matching

2003-11-19 Thread Shaw, Matthew
> Hi, I'm trying to find out how many newline characters are in > a string. I thought there would be a simple function for > this, but I can't find it; Do I need to step through the > string a character at a time to check this? I have used this: #!/usr/bin/perl use warnings; use strict; my $

Re: Pattern Matching

2003-11-19 Thread Rob
This is what I finally came up with, but it too seems rather clunky. my $cnt = 0; $_ = $notes; $cnt = tr/\n//; -- Rob On Wed, 19 Nov 2003, Rob wrote: > Hi, I'm trying to find out how many newline characters are in a string. I > thought there would be a simple function for this, but I can't fin

export constants from package

2003-11-19 Thread Haim Ashkenazi
Hi I'm writing a module to serve a script I'm writing and I was wondering if it's possible to add a constant to the @EXPORT array. I prefer not to use variables because these settings shouldn't be changed, but I want every script that uses this module to be able to access these constants. I read

Re: Strange characters

2003-11-19 Thread david
Chetak Sasalu wrote: > > Hi, > > when I open perldoc in cygwin ,I get some formatting characters like > ESC[1m...) along with the text. >Below is a cp/paste of what I see on my screen. > > -- > 1::NET::FTP(3)

Re: Pattern Matching

2003-11-19 Thread Jeff 'japhy' Pinyan
On Nov 19, Rob said: >This is what I finally came up with, but it too seems rather clunky. > >my $cnt = 0; >$_ = $notes; >$cnt = tr/\n//; Yeah; why not: my $count = ($notes =~ tr/\n//); -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734

Re: Pattern Matching

2003-11-19 Thread david
Rob wrote: > This is what I finally came up with, but it too seems rather clunky. > > my $cnt = 0; > $_ = $notes; > $cnt = tr/\n//; > clunky? what's your definition of not clunky? shorter one: my $count = $notes =~ y/\n//; david -- s,.*,<<,e,y,\n,,d,y,.s,10,,s .ss.s.s...s.sss.s.ss s.

TokeParser help

2003-11-19 Thread Boris Shor
Hello, I am a Perl newcomer, and I'm trying to use the TokeParser module to extract text from an HTML file. Here's the Perl code: use HTML::TokeParser; my $p = HTML::TokeParser->new("test.htm"); while ($p -> get_tag('b')) { print $p -> get_text(),"\n"; } This works only on bold tags

Re: export constants from package

2003-11-19 Thread drieux
On Wednesday, Nov 19, 2003, at 06:38 US/Pacific, Haim Ashkenazi wrote: Hi I'm writing a module to serve a script I'm writing and I was wondering if it's possible to add a constant to the @EXPORT array. I prefer not to use variables because these settings shouldn't be changed, but I want every s

Www::mechanize https erratic response

2003-11-19 Thread Paul Kraus
I have a script that connects to an https page. It will randomly connect and run. The rest of the time it fails with a 500 error. It truly is random. I just rerun the script until it displays results. If I do this via a browser it will fetch the pages each time. Now it does do a couple get(url)'s

Re: Www::mechanize https erratic response

2003-11-19 Thread Kevin Old
On Wed, 2003-11-19 at 16:14, Paul Kraus wrote: > I have a script that connects to an https page. > > It will randomly connect and run. The rest of the time it fails with a > 500 error. > > It truly is random. I just rerun the script until it displays results. > If I do this via a browser it will

Re: export constants from package

2003-11-19 Thread drieux
On Wednesday, Nov 19, 2003, at 06:38 US/Pacific, Haim Ashkenazi wrote: as an illustration: ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Www::mechanize https erratic response

2003-11-19 Thread Paul Kraus
When finished it would run as a weekly cron job. Right now its just being run manually. Thanks on the resources! Paul -Original Message- From: Kevin Old [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 4:27 PM To: [EMAIL PROTECTED] Cc: 'Beginners Perl' Subject: Re: Www::mech

Re: Perl optimization tools

2003-11-19 Thread Paul Johnson
On Wed, Nov 19, 2003 at 09:40:20AM -0500, Jeff 'japhy' Pinyan wrote: > On Nov 19, EUROSPACE SZARINDAR said: > > >Are there tools like in C (lint, gconv, gprof) to know a little more about > >the perl execution. > > > >What could be very usefull : > >nb of times a subroutine is executed, > >time sp

Re: TokeParser help

2003-11-19 Thread david
Boris Shor wrote: > Hello, > > I am a Perl newcomer, and I'm trying to use the TokeParser module to > extract text from an HTML file. Here's the Perl code: > > use HTML::TokeParser; > my $p = HTML::TokeParser->new("test.htm"); > while ($p -> get_tag('b')) > { > print $p -> get_text(),"\n

Re: Fedora and Findmodules Script

2003-11-19 Thread Clint
Yes, I have probably around 60+ modules that I had previously dl'd prior to the upgrade to Fedora. For example, I know I previously had (and still have) Geo::Weather installed, and CPAN confirms this: cpan> install Geo::Weather CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Databa

RE: Fedora and Findmodules Script

2003-11-19 Thread LoBue, Mark
> -Original Message- > From: Clint [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 19, 2003 4:53 PM > To: [EMAIL PROTECTED] > Subject: Re: Fedora and Findmodules Script > > > Yes, I have probably around 60+ modules that I had previously > dl'd prior > to the upgrade to Fedora. For

Re: export constants from package

2003-11-19 Thread R. Joseph Newton
Haim Ashkenazi wrote: > Hi > > I'm writing a module to serve a script I'm writing and I was wondering if > it's possible to add a constant to the @EXPORT array. I prefer not to use > variables because these settings shouldn't be changed, but I want every > script that uses this module to be able t