Re: calling sub

2003-02-10 Thread Rob Dixon
Benjamin Jeeves wrote: > Thank You Rob you have been a great help but work it out now I'm glad to hear it. You might like to post your working version for the group to look over. You will teach others something, and you may find that people can make useful comments. Well done Benjamin. Rob -

Re: calling sub

2003-02-10 Thread Benjamin Jeeves
Thank You Rob you have been a great help but work it out now On Monday 10 Feb 2003 2:39 pm, Benjamin Jeeves wrote: > On Monday 10 Feb 2003 11:57 am, Rob Dixon wrote: > > Hope you do not mind in helping me out but have try what you put below with > know luck. This is what I have do and try many wa

Re: calling sub

2003-02-10 Thread Benjamin Jeeves
On Monday 10 Feb 2003 11:57 am, Rob Dixon wrote: Hope you do not mind in helping me out but have try what you put below with know luck. This is what I have do and try many ways sub main_prog { my $counter = 0; my $counter1 = 0; $filepos = tell FILEIN; for(;;) {

Re: calling sub

2003-02-10 Thread Rob Dixon
Benjamin Jeeves wrote: > It still add record that it found on the first pass though the while > loop to my database what I need is some way to mark my file to the > point that it get to so it will not find a dupluted of the some > record as the file grows. ant ideas on how I do that. It sounds as

Re: calling sub

2003-02-09 Thread Benjamin Jeeves
It still add record that it found on the first pass though the while loop to my database what I need is some way to mark my file to the point that it get to so it will not find a dupluted of the some record as the file grows. ant ideas on how I do that. On Sunday 09 Feb 2003 8:30 pm, Rob Dixon

Re: calling sub

2003-02-09 Thread R. Joseph Newton
Rob Dixon wrote: > ...(who taught you to Capitalise > your scalars :-? )... Huh?!? "Taught"?? Wuzzat mean--"taught"? ~( ;- |) ) Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: calling sub

2003-02-09 Thread Rob Dixon
Rob Dixon wrote: > sub alert > { > seek FILEIN, 0, SEEK_SET; > > while( ) Of course, that should be while () > { > # does some thing on pattern matching > } > } Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: calling sub

2003-02-09 Thread Rob Dixon
Benjamin Jeeves wrote: > On Sunday 09 Feb 2003 7:23 pm, Rob Dixon wrote: >> >> I'm pretty sure that, as I said before, you're reading from the file >> in several different places. The 'start' subroutiine will read the >> first >> line and then call 'build_db' which may well read all of the rest of

Re: calling sub

2003-02-09 Thread Rob Dixon
R. Joseph Newton wrote: > Rob Dixon wrote: > >>> $filein = $ARGV[0]; >>> open(filein, "$filein"); >> >> Filehandles are traditionally all uppercase, and it's not >> good to put a variable in quotes unless you have a reason >> to. >> >> open FILEIN, $filein; > > You're right, of course, about th

Re: calling sub

2003-02-09 Thread Rob Dixon
Benjamin Jeeves wrote: > if I do not call build_db then alert will run fine as I want it to so > is there away around this problem. See I need the FILEIN to go though > a number of different sub routes how would I go about this. Benjamin. I'm pretty sure that, as I said before, you're reading fro

Re: calling sub

2003-02-09 Thread R. Joseph Newton
Rob Dixon wrote: > > $filein = $ARGV[0]; > > open(filein, "$filein"); > > Filehandles are traditionally all uppercase, and it's not > good to put a variable in quotes unless you have a reason > to. > > open FILEIN, $filein; You're right, of course, about the quotes. It seems to me that this

Re: calling sub

2003-02-09 Thread Dave K
Benjamin Jeeves, You can probably figure this out. Try running the code below supplying whatever file name you choose to save it as for an argument. #!/usr/bin/perl -w use strict; my $filein = $ARGV[0]; print "$filein\n"; open(FILEIN, $filein); my $counter = 0; my $counter1; &start; sub start

Re: calling sub

2003-02-09 Thread Benjamin Jeeves
if I do not call build_db then alert will run fine as I want it to so is there away around this problem. See I need the FILEIN to go though a number of different sub routes how would I go about this. On Sunday 09 Feb 2003 4:39 pm, Benjamin Jeeves wrote: > Can someone tell me why my call to bu

Re: calling sub

2003-02-09 Thread Rob Dixon
Benjamin Jeeves wrote: > Can someone tell me why my call to build_db() works but when I call > alert() it will not work as it calls alert but will not enter the > while loop I my opening the file with > > #!/usr/bin/perl Please add these lines here: use strict; use warnings; as together

Re: calling sub

2003-02-09 Thread ktb
On Sun, Feb 09, 2003 at 04:39:00PM +, Benjamin Jeeves wrote: > > Can someone tell me why my call to build_db() works but when I call alert() it > will not work as it calls alert but will not enter the while loop I my > opening the file with > > #!/usr/bin/perl > > $filein = $ARGV[0]; > ope

Re: calling sub based on database list

2002-06-21 Thread Jonathan E. Paton
--- [EMAIL PROTECTED] wrote: > Ok, I got sorta a hard question that involves > calling randomly changing subroutines. Hmm... instantanously the security alarm bell sounds. > What I'm trying to do is this. 5 libaries are required > into my CGI(PERL) program. Each of them has their own > set of

Re: calling sub based on database list

2002-06-21 Thread Jeff 'japhy' Pinyan
On Jun 21, [EMAIL PROTECTED] said: >home|&htmlBody,&Header,&homebody,&footer > >So it should get the list of subrutined to call but I can not figure out >how to call them since they are strings and not hard coded into the >code. Basicly I can get the values and print them out but not call >them.