RE: sorting a hash - multiple key fields

2002-09-17 Thread Ramprasad A Padmanabhan
If you are using a small hash do not bother about the load If you are going to use huge hashes I think you should create subhashes or sorted arrays on the fly using *map* . I personally am not very fluent with map I think you will get better help on the mailling list with a more direct question

grouping regex match return values

2002-09-17 Thread Rum Pel
I want to pick dates from a file, I did it the following way: - $day = "([12]?[0-9]|30|31)"; $weekday = "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)"; $month = "([1-9]|10|11|12|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"; $year = "(1999|2000|2001|2002)"; $query = "$month\/$day\/$year"; @q = "Today

Re: How To Build A Perl Message Board From Scratch

2002-09-17 Thread Jordan C.
I've got one. Take the degree, etc that John below has told you about, get a job that he has told you about, etc. Then, when you're really good at Perl, download YaBB at http://yabbforum.com and study the source. Then, build from scratch off the ideas you get from YaBB, bugfixing on the way. John,

RE: How To Build A Perl Message Board From Scratch

2002-09-17 Thread John Almberg
Simple . . . 1. Get a CS degree at the technical university of your choice. 2. While you're there, do some web programming for fun and to put some of the things you learn to practical use. 3. After graduation, get a job -- preferably in a UNIX/LINUX shop -- so you can hone your practical skills a

RE: Please...Help me. How to arrange my widget with pack

2002-09-17 Thread Toby Stuart
have a look at the Tk::Table module. i have provided a trivial example below. #--- 8< ---# use strict; use warnings; use Tk; use Tk::Table; my $mw; my $table; my $txtEntry1; my $txtEntry2; $mw = new MainWindow(); $mw->title("Table Layout

Re: Simple one :-)

2002-09-17 Thread Michael Fowler
On Tue, Sep 17, 2002 at 05:06:31PM -0400, Chas Owens wrote: > Nope, you are looking at an indirect method call (OO Perl stuff). The > actual call is > > FH->print($arg1, $arg2); While it's tempting to say this, because the syntax looks identical, it's not the case. Try substituting a different

Re: references

2002-09-17 Thread Chas Owens
On Tue, 2002-09-17 at 17:35, Colin wrote: > Hi, > > If you happen to read this, please could you leave the adress of the site where you >learnt perl, or the best site concerning perl that you have seen? > > Thanks a lot > > Colin > > ps. if you can't rember the adress of-hand, don't bother sp

Re: Move

2002-09-17 Thread Wiggins d'Anconia
perldoc -f rename Don't know if rename accepts wild cards. If not you can use an opendir with a foreach loop, not as short/clean but will work pretty well. http://danconia.org Shishir K. Singh wrote: > Is there a keyword for moving a set of files from one dir to another > eg like doing >

Re: return type of $ua->request

2002-09-17 Thread Michael Fowler
On Tue, Sep 17, 2002 at 01:50:34AM -0400, Rum Pel wrote: > > use HTTP::Request::Common; > $ua = LWP::UserAgent->new; > my $res = $ua->request(GET 'http://www.sn.no/'); > if ($res->is_success) { ... > > Now, what is the type of 'res' variable? > > In the html documentation that comes with perl

Re: return types again

2002-09-17 Thread Michael Fowler
On Tue, Sep 17, 2002 at 07:56:55AM -0400, Rum Pel wrote: > I installed MailTools, and want to use > Mail::Util->read_mbox($file) > THe documentation says: > "Read $file, a binmail mailbox file, and return a list of references. Each > reference is a reference to an array containg one message." >

Move

2002-09-17 Thread Shishir K. Singh
Is there a keyword for moving a set of files from one dir to another eg like doing move ("*.log" , "/tmp/") without the use of glob or individual file looping. Thanks Shishir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: OT? - Webmaster List

2002-09-17 Thread Troy May
Thanks David. I know it's OT, I flagged it right away in the subject line, I just figured somebody on here would know of a good one. I'll browse through that page, but it looks like they're all for Perl (or something related to Perl) Thanks. Troy -Original Message- From: david [mailto

RE: OT? - Webmaster List

2002-09-17 Thread david
Troy May wrote: > Thanks for responding. Actually, I just wanted one in general. It > doesn't > matter what it's about. I'm learning everything. > since this list is about Perl, here is one that tells you many such mailing list: http://lists.cpan.org/ it should be useful to you. :-) davi

RE: OT? - Webmaster List

2002-09-17 Thread Troy May
Thanks for responding. Actually, I just wanted one in general. It doesn't matter what it's about. I'm learning everything. I'll check out the Babble list. But it looks like a Yahoo community, more than just an email list like this one and the CGI one. I don't want to have to log in anywhere

RE: sorting a hash - multiple key fields

2002-09-17 Thread david
Jeff wrote: > Thanks for the response - some questions on your recommendation below: > > -Original Message- > From: david [mailto:[EMAIL PROTECTED]] > Sent: 17 September 2002 19:06 > To: [EMAIL PROTECTED] > Subject: Re: sorting a hash - multiple key fields > > >> the return statment is

RE: sorting a hash - multiple key fields

2002-09-17 Thread Jeff
Thanks for the response - some questions on your recommendation below: -Original Message- From: david [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 19:06 To: [EMAIL PROTECTED] Subject: Re: sorting a hash - multiple key fields > the return statment is uneccessary. try something lik

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > > > Oops, that if should be which is still giving me the error: > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Session > oh, another problem is that if you are using: mm-dd- hh:mm:ss directly to Date::Manip's ParseDate() function, it won't work. if you have sa

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > > > Oops, that if should be which is still giving me the error: > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Session > i don't see why your expression won't work. prehaps it's something else that isn't working... david -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Weird problem with a regexp.

2002-09-17 Thread Steve
At 12:54 PM 9/17/02 -0700, you wrote: >Steve wrote: > > > I have this snippet of code which works fine. $start_time has MM-DD- > > HH:MM:SS.MM which is what I want. > > > > # > > > > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Connection > > Establ

references

2002-09-17 Thread Colin
Hi, If you happen to read this, please could you leave the adress of the site where you learnt perl, or the best site concerning perl that you have seen? Thanks a lot Colin ps. if you can't rember the adress of-hand, don't bother spending hours trying to find it, I wouldn't want to waste you

Re: Simple one :-)

2002-09-17 Thread david
Anthony Saffer wrote: > print(OUTFILE, "$PNdString\n"); > > This is line #19 in my code. When I run it I am told I cannot have a coma > after the filehandle. Why not?? I thought this was standard Perl syntax? > > Anthony if you put a comma after your filehandle, it could mean something totally

Re: Linux Answering Machine

2002-09-17 Thread Tony
Thanks To Sukumar & Zentara, I understand about the ringing now, I think I can find something like a usb device that will ring for me, thanks a lot zentara, that really helps, Thanks for not letting me go off and kill 20 modems first, hehe Tony - Original Message - From: "zentara" <[EM

Re: Simple one :-)

2002-09-17 Thread Chas Owens
On Tue, 2002-09-17 at 16:48, Anthony Saffer wrote: > print(OUTFILE, "$PNdString\n"); > > This is line #19 in my code. When I run it I am told I cannot have a coma after the >filehandle. Why not?? I thought this was standard Perl syntax? > > Anthony Nope, you are looking at an indirect method c

RE: Simple one :-)

2002-09-17 Thread Sean Rowe
I'm using Visual Slick Edit as my perl editor, and when I type in 'print(', it tells me the syntax is: (FILEHANDLE LIST) try it without the comma. Who knows? Maybe it'll work. =) -Original Message- From: Anthony Saffer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:49

Please...Help me. How to arrange my widget with pack

2002-09-17 Thread Prabu Subroto
Dear my friends, Any body would be so kind to teach me how to put label and input of a form in one row. I am meaning like this : " Name of person : [input column with entry widget] " Here I rewrote the code under below. Thank you very much in advance. #!/usr/bin/perl use Tk; my $MainWindow =

Simple one :-)

2002-09-17 Thread Anthony Saffer
print(OUTFILE, "$PNdString\n"); This is line #19 in my code. When I run it I am told I cannot have a coma after the filehandle. Why not?? I thought this was standard Perl syntax? Anthony

Thanks!!

2002-09-17 Thread Anthony Saffer
Just wanted to take the time to thank everyone who offered their help to me today in response to my silly questions. I leared a LOT about Perl today and the more I learn the more I like it. Thanks again!! Anthony

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > I have this snippet of code which works fine. $start_time has MM-DD- > HH:MM:SS.MM which is what I want. > > # > > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Connection > Established.+(\d\d\d\d\d)/i) { > $start_time = $1

RE: multidimensional arrays in PERL

2002-09-17 Thread Kipp, James
you can simulate md arrays with references. your line of code actually sets an element of the md array to obtain the value stored at the "pointed to" memory location you dereference it like: print $elements[0][0]; or print $elements[0]->[0]; if you need to push on array onto another, you must p

Re: One last question

2002-09-17 Thread david
Anthony Saffer wrote: > Hello AGAIN, > > I have one final question that I think will set me free from this coding > haze I've been in all day. Please look at the code below. Here is the idea > I am trying to implement: > > I have a text file with a list of about 56,000 filenames. Only the > fil

Weird problem with a regexp.

2002-09-17 Thread Steve
I have this snippet of code which works fine. $start_time has MM-DD- HH:MM:SS.MM which is what I want. # if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Connection Established.+(\d\d\d\d\d)/i) { $start_time = $1; printf ("Start Ti

Re: Recognizing Directories...

2002-09-17 Thread Peter_Farrar
>Hello Everyone, >I am writing a utility that needs to index the files contained within about 500 directories (some nested). I want to provide the >script with a top directory and have it recurse through everything underneath while indexing the files within each. I've searched >Google and can't

How To Build A Perl Message Board From Scratch

2002-09-17 Thread Baruti Kamau
We are offering $400 in cash and 10,000 shares of restricted stock to the first programmer who can teach us how to build a simple perl based message board from scratch. Participants are expected to respond to questions on our forum "Message Board Scripts." The perl code should be able to work

One last question

2002-09-17 Thread Anthony Saffer
Hello AGAIN, I have one final question that I think will set me free from this coding haze I've been in all day. Please look at the code below. Here is the idea I am trying to implement: I have a text file with a list of about 56,000 filenames. Only the filenames are in this file. I have ano

Re: perl script not run by cron

2002-09-17 Thread John W. Krahn
Larry Lefthook wrote: > > Hi! I have modified gsmcontrol.pl (yty.net) as contrologo.pl. & I wonder why > my script is not run by crontab when it works when I run it by hand. I have > a file for the script in /var/gsm/in and when I run contrologo.pl from > commandline it sends sms message (logo) u

Re: sorting a hash - multiple key fields

2002-09-17 Thread david
Jeff Aa wrote: > Folks, > > I want to sort my masked hashes into neat little piles for easier > digestion: > Please note this is _example_ data 8-) > > my $h = { > a => { name => 'apple', taste => 3 }, > b => { name => 'peach', taste => 2 }, > c => { name => 'banana', taste => 2 }, > } >

RE: open() command and exiting script

2002-09-17 Thread Kothari, Amitkumar, NPONS
put open(STDOUT, ">>trans-d.html"); instead of open(STDOUT, ">trans-d.html"); Amit Kothari Server Operation Group Redwood City Project Bridgeton 314-298-2017 -Original Message- From: david [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17,

Re: Regular expression multiline matching with /m

2002-09-17 Thread david
Reg Smith wrote: > > my $prev_abs="..\\obj\\gsm_gp_flash_prev.abs"; > my $abs_file="..\\obj\\gsm_gp_flash.abs"; > my $months='(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)'; > > # collect the output of NT fc (file compare) command > $diff_abs = `fc /W $abs_file $prev_abs 2>&1`; > > if($diff

Re: Counting the same word

2002-09-17 Thread Tanton Gibbs
It depends on what you mean by word I would assume you could do something like %seen = (); while( ) { $seen{lc $_}++ for( split /\s+/ ); } - Original Message - From: "ANIDIL RAJENDRAN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 17, 2002 11:42 AM Subject: Count

Internationalization/Globalization

2002-09-17 Thread John Almberg
I'm looking to Internationalize/Globalize a web site . . . can anyone point me to Perl-related resources on this topic? Lists? White Papers? Modules? Web Sites? I've got tons of general info on this topic . . . looking for Perl-specific info. Thanks in advance for any help . . . -- John -- T

Re: dealing with Prime Numbers

2002-09-17 Thread david
Mark Goland wrote: > Ic...sorry about that, It just didnt work on my XP box, but as I said > great on Solaris. > what is the error message looks like? what version of Perl you have in your XP box? david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: open() command and exiting script

2002-09-17 Thread david
Jordan C. wrote: > Hello. I have a transliterator script, and I need some help with it. > Source is at the bottom of this message. What I need help with in > particular is the open() command. The two relevant lines of the script > are: open(STDOUT, ">trans-d.html"); - and - print STDOUT "$transme

Re: multidimensional arrays in PERL

2002-09-17 Thread Chas Owens
On Tue, 2002-09-17 at 12:37, pravesh biyaNI wrote: > Hi' >Are there multidimensional arrays in Perl. > > for e.g can we write the way we write in C > > $elements[0][0]= something; > > > etc..etc.. > > regards > pravesh Short answer: yes. Long Answer: There are arrays can hold sc

multidimensional arrays in PERL

2002-09-17 Thread pravesh biyaNI
Hi' Are there multidimensional arrays in Perl. for e.g can we write the way we write in C $elements[0][0]= something; etc..etc.. regards pravesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Extracting text from a phrase

2002-09-17 Thread Kirby_Sarah
What is generating the source file? If you are sure that all the html is standardized, then you can be more strict. Maybe if you could send a section (20 lines or so) so we could see what you are working with... -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED]] Sen

RE: Counting the same word

2002-09-17 Thread Nikola Janceski
Are you only looking for 'california' (case-sensitive?) ? if so: open (FILE,"C:\\proj\\order\.txt") or die "cannot open file: $!"; %seen = (); while () { $count += s/california//g; ## substitute returns number of subs (m// doesn't) } print "california: $count\n"; > -Original Messa

RE: Yet another question...

2002-09-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From what you are asking, it sounds like you are using a regex, then add a i to the end of the regex. If not a regex, then you could either uc ( upper case ) or lc ( lower case ) the inputted value and check accordingly. uc($filename) eq 'SUPER.GIF' or lc($filename) eq 'super.gif

Re: Counting the same word

2002-09-17 Thread Mat Harris
sorry, i meant this: #!/usr/bin/perl $count = 0; while () { if (m/california/g) { $count++; } } print "california: $count\n"; On Tue, Sep 17, 2002 at 12:08:03 -0400, Nikola Janceski wrote: > nope that only counts the word

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
That's because my match isn't matching anything. It's not very forgiving and anything so much as a space or case change in the wrong place could throw it off. Can you alter the match a little so it will catch the actual lines? James On Tuesday, September 17, 2002, at 10:58 AM, Ian wrote:

RE: Counting the same word

2002-09-17 Thread Nikola Janceski
nope that only counts the word once per line.. if the word was in the line twice it would only count it once. > -Original Message- > From: Mat Harris [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 12:06 PM > To: ANIDIL RAJENDRAN > Cc: [EMAIL PROTECTED] > Subject: Re: Count

Yet another question...

2002-09-17 Thread Anthony Saffer
Hello Again Everyone, I do apologize for all the newbie questions but I really have to get this program written today and this list is my only "live" resource besides Google. I'll try to keep my questions to a minimum. But here is one more if you don't mind. 1. How do I ignore case in my prog

Re: Counting the same word

2002-09-17 Thread Mat Harris
i think this will work, but don't complain if it doesn't 'cos im tired. ok? #!/usr/bin/perl $count = 0; while () { if (m/california/) { $count++; } } print "california: $count\n"; On Tue, Sep 17, 2002 at 08:42:57 -0700, AN

RE: Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Thank you but when I try and run that by doing a Perl script.pl file.shtml >newfile.txt I am getting a blank output. Sorry if I did not explain myself correctly. There are multiple instances of this line in the one page, and I need to generate a simple text file to use for another applica

RE: Help in developing new message board

2002-09-17 Thread Kipp, James
woops , forgot the link: http://www.discusware.com/discus/index.php > -Original Message- > From: Kipp, James > Sent: Tuesday, September 17, 2002 11:49 AM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: Help in developing new message board > > > i use this one, works great.

RE: Help in developing new message board

2002-09-17 Thread Kipp, James
i use this one, works great. there is a free version that is easy to setup > -Original Message- > From: Baruti Kamau [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 11:42 AM > To: [EMAIL PROTECTED] > Subject: Help in developing new message board > > > Is anyone out there

Help in developing new message board

2002-09-17 Thread Baruti Kamau
Is anyone out there interested in helping a novice perl user to develop a simple message board in perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Counting the same word

2002-09-17 Thread ANIDIL RAJENDRAN
Hi, I want to count the number of times a particular word occured in a file. Though the following script is working, is it possible to shorten it? -- open (FILE,"C:\\proj\\order\.txt") or die "cannot open file: $!"; %seen = (); while () { while ( /(\w['\w-]*)/g) { $seen{lc $1}++; } }

Perl documentation and Inherited methods

2002-09-17 Thread drieux
volks, there was the recent query about so what exactly does an LWP::UserAgent return? Those who come to perl with a background in other OO languages remember that any sub_class will inherit the methods of it's super class, all the way up the parental chain to the beginning of time. U

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
Why not try grabbing all the important stuff right out of the pattern, like my example below. Note: Your pattern may need changes if I assumed too much, from your examples. #!/usr/bin/perl while (<>) { if (m!([^<]+)!) { print qq(); } } On Tuesday, September 17, 2002, at 10:05 AM, Ian wrote:

Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Please excuse this newbie question, but I am getting confused :( I need at have a small script that will extract selected words from a phrase and then insert them into a new string. I have an html page that I need to extract both urls & keywords from and put them into a new file. Should be f

RE: Recognizing Directories...

2002-09-17 Thread Bob Showalter
> -Original Message- > From: Anthony Saffer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 11:03 AM > To: [EMAIL PROTECTED] > Subject: Recognizing Directories... > > > Hello Everyone, > > I am writing a utility that needs to index the files > contained within about 500

RE: Recognizing Directories...

2002-09-17 Thread Nikola Janceski
you should check out File::Find on CPAN.org. > -Original Message- > From: Anthony Saffer [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 11:03 AM > To: [EMAIL PROTECTED] > Subject: Recognizing Directories... > > > Hello Everyone, > > I am writing a utility that needs to

Recognizing Directories...

2002-09-17 Thread Anthony Saffer
Hello Everyone, I am writing a utility that needs to index the files contained within about 500 directories (some nested). I want to provide the script with a top directory and have it recurse through everything underneath while indexing the files within each. I've searched Google and can't se

RE: Timers?

2002-09-17 Thread Hanson, Rob
Sounds like a good job for Perl threads, a fork, or maybe a seperate process. Stable threads are only available in 5.8, and would probably be the best way to go about it. http://www.perl.com/pub/a/2002/09/04/threads.html Forking would be messy I would think. A seperate process might be ok, but

Timers?

2002-09-17 Thread dan
I'm writing IRC services in perl (some say it's a bad idea, others good, I personally don't care what the language is, it has a fast response time and does what I want it to do), however I need to have a sub to check bans every second, to see if it should time them out and remove them. I have the

Re: Perl or Object Oriented Perl?

2002-09-17 Thread drieux
On Tuesday, Sep 17, 2002, at 03:08 US/Pacific, [EMAIL PROTECTED] wrote: [..] first off the OO v. Proceduralist debate is a bit of a red herring. There are strengths and weaknesses to both. An elegantly designed OO Class/sub_classing is a beauty, but a badly implemented structure is a PAIN. > I

Re: Linux Answering Machine

2002-09-17 Thread Sukumar .S
Hi, Checkout http://bayonne.sourceforge.net !! Regards, S. Sukumar Chennai. India > I'm trying to create an answering machine for linux, > > How can I have perl do something when the modem is getting a ring?? > > I need to start tinkering with the modem to figure it out. > > The modem is o

RE: sorting a hash - multiple key fields

2002-09-17 Thread Jeff AA
> -Original Message- > From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED]] > Sent: 17 September 2002 14:44 > To: [EMAIL PROTECTED]; Jeff Aa > Cc: [EMAIL PROTECTED] > Subject: Re: sorting a hash - multiple key fields > > > Use this . I think you wud do better later to move the sort

Re: dealing with Prime Numbers

2002-09-17 Thread Janek Schleicher
Angerstein wrote at Mon, 16 Sep 2002 15:10:41 +0200: > Does anyone here have an idea of how to get all prime numbers between 1 and > 1000? > Is there a modul to deal with prime numbers? In the Perl Power Tools (you could e.g. install with perl -MCPAN -e 'install Bundle::PPT') is a little tool t

RE: Perl or Object Oriented Perl?

2002-09-17 Thread NYIMI Jose (BMB)
You made a very good choice !. I have this book and learned a lot from it. As said, there is a refresh chapiter about basics on Perl so don't waste a lot time by starting with "Learning Perl" book and fourth ... Just go ahead "Object Oriented Perl" since you are familiar with OO concepts. José

Re: get variable with regexp from array?

2002-09-17 Thread Ramprasad A Padmanabhan
If I understand correctly you want to match a regexp for every element in an array use @newarray = grep{/regex/} @array; @newarray will get u all elements of array which match regex David Samuelsson wrote: > Is there an simple way, that if i have an array, to get an simple match with a >re

Re: Executing DOS "copy" command from perl script via web interface

2002-09-17 Thread Tim Musson
Hey FlashGuy, My MUA believes you used PMMail 2000 Standard (2.20.2502) For Windows 2000 (5.1.2600;1) to write the following on Tuesday, September 17, 2002 at 8:00:06 AM. F> I have a web interface where I'm executing a compiled perl script. F> Within the perl script I'm trying to execut

Re: perl script not run by cron

2002-09-17 Thread Ramprasad A Padmanabhan
Hello trap all errors run your program in cron as /usr/local/bin/contrologo.pl >> /tmp/mylog 2>&1 Larry Lefthook wrote: > Hi! I have modified gsmcontrol.pl (yty.net) as contrologo.pl. & I wonder > why my script is not run by crontab when it works when I run it by hand. > I have a file for the

Re: sorting a hash - multiple key fields

2002-09-17 Thread Ramprasad A Padmanabhan
Use this . I think you wud do better later to move the sort function to a seperate sub foreach $key (sort { ($$h{$a}{taste} eq $$h{$b}{taste} ) ? $$h{$a}{name} cmp $$h{$b}{name}: $$h{$a}{taste} \cmp $$h{$b}{taste} } (keys %$h)) { print "$key \n"; } Jeff Aa wrote: > Folks, >

Re: Perl or Object Oriented Perl?

2002-09-17 Thread mmaunder
Doesn't say anything on manning's site (publisher) although they do have an eBook edition now for download for $16.50. Check out http://www.manning.com/Conway/ On Tue, Sep 17, 2002 at 08:20:04AM -0500, [EMAIL PROTECTED] wrote: > I agree with the below analysis. Only thing I might say is that a

RE: dealing with Prime Numbers

2002-09-17 Thread Scott Taylor
At 05:55 AM 17/09/2002, Meidling, Keith, CTR, OSD-C3I wrote: >it didn't print anything out on my machine. :-( > >W2K, Activestate Perl 5.6.1 build 633 That's because Windoze is missing a world of goodies (including grep, d'oh!); nothing wrong with that algorithm on any other OS. -- To unsubsc

RE: dealing with Prime Numbers

2002-09-17 Thread Mohd Salman
Try this , for Activestate Perl/W2K perl -e "foreach $i (2..shift||1e2){ print \"$i \" unless (9x$i) =~ /^(99+)\1+$/ } " 100 > >it didn't print anything out on my machine. :-( > >W2K, Activestate Perl 5.6.1 build 633 > >-Original Message- >From: Tanton Gibbs [mailto:[EMAIL PROTECTED]] >

Re: Perl or Object Oriented Perl?

2002-09-17 Thread wiggins
I agree with the below analysis. Only thing I might say is that a person with good programming experience/habits and a familarity with the command line (specifically unix) might be able to dive right in to Programming Perl without first stopping off at Learning Perl (save time and money). A lot

Re: perl script not run by cron

2002-09-17 Thread Sudarshan Raghavan
On Tue, 17 Sep 2002, larry lefthook wrote: > Hi! I have modified gsmcontrol.pl (yty.net) as contrologo.pl. & I wonder why > my script is not run by crontab when it works when I run it by hand. I have > a file for the script in /var/gsm/in and when I run contrologo.pl from > commandline it send

RE: dealing with Prime Numbers

2002-09-17 Thread Meidling, Keith, CTR, OSD-C3I
it didn't print anything out on my machine. :-( W2K, Activestate Perl 5.6.1 build 633 -Original Message- From: Tanton Gibbs [mailto:[EMAIL PROTECTED]] Sent: Monday, September 16, 2002 11:36 AM To: John Almberg; [EMAIL PROTECTED] Subject: Re: dealing with Prime Numbers Explanation: This

Re: Executing DOS "copy" command from perl script via web interface

2002-09-17 Thread Sudarshan Raghavan
On Tue, 17 Sep 2002, FlashGuy wrote: > > Hi, > > I have a web interface where I'm executing a compiled perl script. Within the perl >script I'm trying to execute a DOS command but its not working properly. > If I put my command in a batch file and execute the batch file from the perl script >

Re: Linux Answering Machine

2002-09-17 Thread zentara
On Mon, 16 Sep 2002 23:52:38 -0700, [EMAIL PROTECTED] (Tony) wrote: >Ok, so this Vgetty module should do most of the work, > >but does anyone know of a way to connect two modems together, > >if I use modem 1 to check for a pin number followed by a #, then in order >to ring the phones I'll have to

perl script not run by cron

2002-09-17 Thread larry lefthook
Hi! I have modified gsmcontrol.pl (yty.net) as contrologo.pl. & I wonder why my script is not run by crontab when it works when I run it by hand. I have a file for the script in /var/gsm/in and when I run contrologo.pl from commandline it sends sms message (logo) using external program (gnokii)

Re: Regular expression multiline matching with /m

2002-09-17 Thread Mohd Salman
Hi, Why you add an empty line after the left / , does fc output start by empty line , if not try if($diff_abs =~ /^Comparing files $abs_file and $prev_abs$ ^\*\*\*\*\* $abs_file$ .. .. .. /omi ...etc > >Hello > >I have a perl script that runs a software build on NT4. The final stage >of this bui

Re: Executing DOS "copy" command from perl script via web interface

2002-09-17 Thread mmaunder
The file can't be found? Sounds like a DOS not a Perl problem. On Tue, Sep 17, 2002 at 08:00:06AM -0400, FlashGuy wrote: > > Hi, > > I have a web interface where I'm executing a compiled perl script. Within the perl >script I'm trying to execute a DOS command but its not working properly. > If

Re: return types again

2002-09-17 Thread mmaunder
Sounds like you need the magic of Data::Dumper. Get it from CPAN. It will take a list of scalars or references and print out their contents in Perl syntax. Give it a try - great for debuggering everything. On Tue, Sep 17, 2002 at 07:56:55AM -0400, Rum Pel wrote: > > > I installed MailTools, a

Executing DOS "copy" command from perl script via web interface

2002-09-17 Thread FlashGuy
Hi, I have a web interface where I'm executing a compiled perl script. Within the perl script I'm trying to execute a DOS command but its not working properly. If I put my command in a batch file and execute the batch file from the perl script it works. I know it's because copy is not a progr

Re: OT? - Webmaster List

2002-09-17 Thread mmaunder
Webmaster for what? Apache webserver? Running on Linux? If that's the case, you may want to join the list for your particular flavour of Linux, and the apache administrators list. Just FYI, if you're interested in learning about anything to do with front ends (flash, html, javascript, etc..) jo

return types again

2002-09-17 Thread Rum Pel
I installed MailTools, and want to use Mail::Util->read_mbox($file) THe documentation says: "Read $file, a binmail mailbox file, and return a list of references. Each reference is a reference to an array containg one message." But nothing is said about the type of message, I cannot even guess

OT? - Webmaster List

2002-09-17 Thread Troy May
Hello, I can't believe how much I'm learning about Perl from this list! I was wondering if anybody knew of a general Webmaster list like this? I would like to be apart of that also and receieve emails from both. The only thing I'm finding is weekly newsletters, not email lists like this one.

Re: return type of $ua->request

2002-09-17 Thread Rum Pel
> >Yes. You can even find out what the caller is expecting. Well, to an >extent anyway. > >peldoc -f wantarray > Wow! thats new and interesting. I looked at a couple of examples on it. It seems to be true if a return value is expected by the caller context. Is this that? or it is true only when

sorting a hash - multiple key fields

2002-09-17 Thread Jeff AA
Folks, I want to sort my masked hashes into neat little piles for easier digestion: Please note this is _example_ data 8-) my $h = { a => { name => 'apple', taste => 3 }, b => { name => 'peach', taste => 2 }, c => { name => 'banana', taste => 2 }, } I want to sort first on taste and then

Re: Perl or Object Oriented Perl?

2002-09-17 Thread mmaunder
Conway's book is excellent!! Definitelly the source for OO perl. But it has some very advanced concepts and assumes a thorough understanding of basic Perl. (He dedicates the first two chapters of the book to an Perl and OO concepts refresher course). So if you're just starting out, definitelly

Re: Perl or Object Oriented Perl?

2002-09-17 Thread Dharmender Rai
go for [1] Learning Perl [2] Programming Perl Both are published by Oreilly --- [EMAIL PROTECTED] wrote: > Hello > > I ordered a book(Perl Object Oriented Programming by > Damian Conway) to > learn Perl from scratch. But I'm not sure whether it > is right to begin > learning Perl with the Obj

Perl or Object Oriented Perl?

2002-09-17 Thread samiyo
Hello I ordered a book(Perl Object Oriented Programming by Damian Conway) to learn Perl from scratch. But I'm not sure whether it is right to begin learning Perl with the Object Oriented aspect of it. I have some knowledge of Object Oriented Programming in Java. Which aspect of perl should I be

Re: CGI: command line works, browser not

2002-09-17 Thread Anette Seiler
Dear David and Sudarshan, thank you very much for your answers. I now know where to look. Kind regards Anette -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Formmail to fax

2002-09-17 Thread samiyo
How do I get the message collected from a formmail, to be sent to a telefax numner. Will it work if I replace the email address with a fax number? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: reading problems in a log file

2002-09-17 Thread Sudarshan Raghavan
On Tue, 17 Sep 2002, pravesh biyaNI wrote: > hi,, > here is the log file.. ( a part of it ) > > T 1018448131 905775 > E 1018448131 905891 172 32869 12 0 2080 > E 1018448131 926173 172 32869 13 0 2240 > E 1018448131 955535 172 32869 14 0 2400 > E 1018448131 955862 172 32869 15 0 2560 > E 10184481

Re: reading problems in a log file

2002-09-17 Thread pravesh biyaNI
Sudarshan Raghavan wrote: >On Tue, 17 Sep 2002, Pravesh Biyani wrote: > >>hi >> i am using a log file which has three or more than three entries in a row and >there are many rows.. >> >>i would like to read the file and determine few things out of it.. i want to know >the way to do it. >> >>C

Re: return type of $ua->request

2002-09-17 Thread Paul Johnson
On Tue, Sep 17, 2002 at 05:03:50AM -0400, Rum Pel wrote: > A function definition in Perl doesnt require you to specify > the return type - why is this so? Can a function return objects > of different types under different conditions, or choose not > to return anything at all? Yes. You can even

  1   2   >