Re: Want a program!!!

2001-06-24 Thread Rajeev Rumale
Hi suman! Clearing cache is fine for my understanding. Writing Virals and worms may be the guru can hepl :-) I think you can this in many ways, i will tell you two. Depending upon your requirements you can choose the right one. 1. Write a demon programs which does the work at. You can ma

Re: How do i set this?

2001-06-24 Thread Anthony E.
foreach my $target (@targets) { print "current target is: $target\n"; } --- Tim Grossner <[EMAIL PROTECTED]> wrote: > I am using a for like so: > > for(@targets) { > ...stuff... > } > > What variable can I use to specify the CURRENT > target to operate on? > > for instance: > > for(@targets)

Re: Help for a newbie..

2001-06-24 Thread Anthony E.
Find some scripts that use the perl environment variables...also read the documentation from cpan.org on CGI.pm - CGI.pm is a very helpful perl module that should already be installed with perl. (i suggest picking up the "Learning Perl" book published by O'Reilly (check bookpool.com or fatbrain.c

Re: Exceptions ( catching and handeling).

2001-06-24 Thread Rajeev Rumale
Dear Me, Thank U for for the reply. I like the short code which you wrote. I am just migrating from java to perl. Currently i write lengthy code just for readability. I sure would be able to pick the shortcuts soon. with regards Rajeev Rumale. ~~~

Re: Exceptions ( catching and handeling).

2001-06-24 Thread Me
> $done="false"; > > while( $done eq "false ") { > eval { > .. > . > read form files. > process info... > write back to files > > }; > ( $@ ) ? ($done="false") : ($done="true"); > > } I don't understand why this isn't working. Cha

Re: With perl, don't expect consistency (was Re: How do I determinenumber of matches in a regex?)

2001-06-24 Thread Brett W. McCoy
On Sun, 24 Jun 2001, Me wrote: > In general, with perl, don't expect consistency. This is just one > of many principles which are considered sacrosanct in many > other languages, but not in perl. Instead, think of something > half way between a computer language and a natural human > language lik

Re: Logo for learn.perl.org

2001-06-24 Thread Me
> logo for learn.perl.orgl What is the special message that learn.perl.org want to convey (other than learn perl)? In my last post, I wrote about the perl learning curve. It is a fundamentally different shaped curve to most other languages. This is the sort of fundamental issue that learn.perl.o

With perl, don't expect consistency (was Re: How do I determine number of matches in a regex?)

2001-06-24 Thread Me
> > > Does anyone know why m//g only returns true on success instead of > > > returning the number of matches like s///g and tr/// do. > > > > ...I can't think of any reason ... It just seems like it should. > > ... I think it's more a matter of usage -- I wrote this earlier, when no one had giv

Re: Exceptions ( catching and handeling).

2001-06-24 Thread Michael Fowler
On Mon, Jun 25, 2001 at 11:29:16AM +0800, Rajeev Rumale wrote: > $done="false"; > > while( $done eq "false ") { > eval { > .. > . > read form files. > process info... > write back to files > > }; > ( $@ ) ? ($done="false") : ($done=

Re: Exceptions ( catching and handeling).

2001-06-24 Thread Rajeev Rumale
Dear Michael, Thanks for your immediate reply. Well for now I only expect true / False. The condition is not becoming true in any case. Even when I am gernating specific errors in the eval block. The code i am trying is like this. $done="false"; while( $done eq "false ") { eval {

Re: Exceptions ( catching and handeling).

2001-06-24 Thread Michael Fowler
On Mon, Jun 25, 2001 at 09:46:06AM +0800, Rajeev Rumale wrote: > But I am not getting the proper values in $@ variable. What do you mean you're not getting the proper values in $@? What values are you getting, what are you expecting? > I would be greatfull if any one can explain the correct us

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Michael Fowler
On Sun, Jun 24, 2001 at 11:14:25PM -0300, Rogério Brito wrote: > On Jun 24 2001, Michael Fowler wrote: > > On Sun, Jun 24, 2001 at 07:13:47PM -0300, Rogério Brito wrote: > > > $n = () = m/string/g; > > > > > > In particular, is "()" an lvalue in Perl? > > > > Yes, it is. () is a lis

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Rogério Brito
On Jun 24 2001, Michael Fowler wrote: > On Sun, Jun 24, 2001 at 07:13:47PM -0300, Rogério Brito wrote: > > 1 - How does the Perl grammar interprets the following statements: > > > > $n = () = m/string/g; > > > > In particular, is "()" an lvalue in Perl? > > Yes, it is. () i

Exceptions ( catching and handeling).

2001-06-24 Thread Rajeev Rumale
Greetings ! 1.I have been useing a set of prcedures which are likely to fail due to various resons. To keep a check on that I used the default eval{} block as mentioned in the book. But I am not getting the proper values in $@ variable. I would be greatfull if any one can explain the corre

Re: Pooling of objects and session data

2001-06-24 Thread Rajeev Rumale
Thats very nice of you. Wating eargerly for you mail with regards Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Bencoolen,

Re: Logo for learn.perl.org

2001-06-24 Thread Elaine -HFB- Ashton
Grant McLean [[EMAIL PROTECTED]] quoth: *> *>A beginner could look at that code snippet, make a good guess at *>what it does and think to themselves 'hey that looks pretty easy *>- why don't I take a deeper look'. Why not a pearl with training wheels? :) getting text into a small area like that a

Re: Opening a file, but adding the date to the name

2001-06-24 Thread Tim Musson
Hey Tim, Sunday, June 24, 2001, 4:33:31 PM, you wrote: TG> but i want to make the filename be $_."the current date" TG> the localtime function doesnt look very promising, as the output is not TG> very human readable :-) I use localtime(time); all the time for this type of thing. here is the c

Re: Getting Started

2001-06-24 Thread K Hendricks
you should visit Original Message Follows From: "Ron Smith" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Getting Started Date: Sat, 23 Jun 2001 20:21:19 -0700 MIME-Version: 1.0 X-Originating-IP: [24.130.49.190] Received: from [209.85.157

RE: Logo for learn.perl.org

2001-06-24 Thread Grant McLean
> I propoused thi logo for learn.perl.orgl, if you liked please > tell me so.And vote on this list. > > http://perl.fluxcenter.com/images/learn_perl4.gif I don't want to sound negative, but I really don't like the proposed logo much at all. The main thing I dislike is that it's not inviting.

Re: Opening a file, but adding the date to the name

2001-06-24 Thread David J Jackson
Jos -- This seem to work. Also check perldoc -f localtime for all the sorid details. Dave #!/usr/local/bin/perl -w use Carp; use POSIX qw(strftime); $now_string = strftime "%Y%m%d", localtime; chomp($now_string); open (CONFIG,">$now_string"); print CONFIG "Today to is: $now_string\n"; close (C

Logo for learn.perl.org

2001-06-24 Thread perl
I propoused thi logo for learn.perl.orgl, if you liked please tell me so.And vote on this list. http://perl.fluxcenter.com/images/learn_perl4.gif The logo is the same size as the 'Download Perl' Button, is very fast. And mathes desing of learn.perl.org The Brown and green are are to resemble a s

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Michael Fowler
On Sun, Jun 24, 2001 at 07:13:47PM -0300, Rogério Brito wrote: > 1 - How does the Perl grammar interprets the following statements: > > $n = () = m/string/g; > > In particular, is "()" an lvalue in Perl? Yes, it is. () is a list assignment with no values. A list assi

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Rogério Brito
On Jun 24 2001, Brett W. McCoy wrote: > m//g *does* return the number of matches > if you use it in the correct context (as we have already discussed to > death...). I'm a Perl newbie that has just joined this list to aid me in my Perl education and, following this discussion, I t

Re: For loop...

2001-06-24 Thread Brett W. McCoy
On Sun, 24 Jun 2001, Tim Grossner wrote: > I am using a for (@targets) loop to connect to cisco routers...if the > target is unreachable I need it to go on to the next target in the array > @targets. What should I look for? An "else" statement or what? You can do something like this: for(@targe

Re: For loop...

2001-06-24 Thread Jos I. Boumans
yes, that would be a good idea, to add in control structures.. i wrote a tutorial about them which you can find here: http://www.sharemation.com/~perl/tut alltho they're momentarily down for maintenance (they joy of free webspace) what you're looking for is something like: for(@foo) { if (con

$a, $b (was Re: Failed in package programme, how do I use package and object?)

2001-06-24 Thread Me
> Just a quick note; dont use $a and $b as named > variables.. they're 'special' (used by the cmp > operator) so to avoid ambiguity, use something > else/more descriptive... or use $c if it makes you happy =) Indeed, I meant to mention something about $a/$b myself. cmp isn't really relevant. $a

For loop...

2001-06-24 Thread Tim Grossner
I am using a for (@targets) loop to connect to cisco routers...if the target is unreachable I need it to go on to the next target in the array @targets. What should I look for? An "else" statement or what? Tim Grossner voice - 217-438-6161 pager - 217-467-3148 cell - 217-971-3060 data - [EMAIL

Re: Opening a file, but adding the date to the name

2001-06-24 Thread Jos I. Boumans
well, there's also the 'time' operator... but it all depends on what format you want/need of course, there's the Date::Format module on cpan taht probably can format it anyway you like look at it here: http://search.cpan.org/search?mode=module&query=date%3A%3Aformat hth, Jos Boumans - Origi

Opening a file, but adding the date to the name

2001-06-24 Thread Tim Grossner
I want to open a file: open (CONFIG, ">/tftpboot/$_"); chmod (0777, "/tftpboot/$_"); but i want to make the filename be $_."the current date" the localtime function doesnt look very promising, as the output is not very human readable :-) Any thoughts? Tim Grossner voice - 217-438-6161 pager

Re: Help for a newbie..

2001-06-24 Thread Me
> im a newbie to PERL.. right now, im learning it but i dont have any exercises > to work on. i need them because its how i learn.. can please someone tell me > what is a nice thing to do when you are still starting to learn PERL and you > want to enhance your skill > tnx http://learn.perl.or

Re: Re: Failed in package programme, how do I use package and object?

2001-06-24 Thread Me
[everyone, please keep posts on list] > I'm programming a registration & editing produce for my site, > I want to bind many of same subroutine into a library, and reuse > these routines in same case. You don't need to use objects at all. You can just use the package and module concepts. You can

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Brett W. McCoy
On Sun, 24 Jun 2001, Bradford Ritchie wrote: > Wow, thanks for all the replies. I'm surprised no one commented on my question >about the matching operator itself: > > > Does anyone know why m//g only returns true on success instead of > > returning the number of matches like s///g and tr/// do.

Re: How do i set this?

2001-06-24 Thread Tim Grossner
Thats the one I want! Works like a charm now :-) On Sun, 24 Jun 2001, Jos I. Boumans wrote: > Hi, > > I think what you mean is this: > > for(@foo){ print "$_\n" } # ie, $_ holds the element of @foo you're > currently looking at > > you can also explicitly name it like so: > > for my $elem

Re: How do I determine number of matches in a regex?

2001-06-24 Thread Bradford Ritchie
Wow, thanks for all the replies. I'm surprised no one commented on my question about the matching operator itself: > Does anyone know why m//g only returns true on success instead of > returning the number of matches like s///g and tr/// do. I realize I'm not identifying some major flaw in

Re: How do i set this?

2001-06-24 Thread Jos I. Boumans
Hi, I think what you mean is this: for(@foo){ print "$_\n" } # ie, $_ holds the element of @foo you're currently looking at you can also explicitly name it like so: for my $element (@foo) { print "$element\n" } hth, Jos Boumans > I am using a for like so: > > for(@targets) { > ...stuff... >

Re: Failed in package programme, how do I use package and object?

2001-06-24 Thread Jos I. Boumans
Just a quick note; dont use $a and $b as named variables.. they're 'special' (used by the cmp operator) so to avoid ambiguity, use something else/more descriptive... or use $c if it makes you happy =) hth Jos Boumans - Original Message - From: "Me" <[EMAIL PROTECTED]> To: <[EMAIL PROTE

How do i set this?

2001-06-24 Thread Tim Grossner
I am using a for like so: for(@targets) { ...stuff... } What variable can I use to specify the CURRENT target to operate on? for instance: for(@targets) { ...stuff...("VARIABLE THAT IS EQUAL TO THE CURRENT TARGET") } Tim Grossner voice - 217-438-6161 pager - 217-467-3148 cell - 217-971-306

RE: :Graph

2001-06-24 Thread RTaylor
I tried your code below but had problems: First, apache didn't like creating the image in the cgi-bin dir, so I changed the reference to apache/icons instead of current directory. Perhaps this is unimportant for your setup. Second - where is @data defined and populated? I assume your code snippet

RE: GD Problem.

2001-06-24 Thread RTaylor
I took the liberty of removing the DBI stuff to make your GD example work. I'm using ActiveState on Win9x. I had to remove the "\n\n" from Content-type as well as changing the Content-type to image/jpeg. #!\perl\bin\perl.exe -w print

Re: Want a program!!!

2001-06-24 Thread suman sanyal
There is nothing viral about it.actually i was writing a program which will clear the cacheso thought of a program which will automatically clear the cache every hour..thats all..but nevertheless i would also like to the viral stuff. -Original Message- From: "Nigel Wetter

Re: Conecting my web server to informix.

2001-06-24 Thread Bruce Ferrell
Joe, You'll need to install perl DBI and DBD Informix. Use the CPAN Client to download and install the as follows: perl -MCPAN -e chell The above starts up the CPAN client in interactive mode. The issue the following commands: install DBI That will download and install the PERL database in

Examples of Curses::ANSIColor

2001-06-24 Thread David J Jackson
Greetings -- I looking examples of scripts using Curses module, doing file operations i.e. open/closing, read/write? Thanks, David Jackson

Help for a newbie..

2001-06-24 Thread JM C. Alonzo
im a newbie to PERL.. right now, im learning it but i dont have any exercises to work on. i need them because its how i learn.. can please someone tell me what is a nice thing to do when you are still starting to learn PERL and you want to enhance your skill tnx