Re: using perl in a c code

2003-12-01 Thread Robert Brown
Ramprasad A Padmanabhan writes: > On Mon, 2003-12-01 at 22:02, Robert Brown wrote: > > > Sounds like you are trying to write a harvesting tool to build a > > spammer's email address list to me. Since you want to do it in C, I > > suspect that either you have a huge amount of text to parse, p

Re: using perl in a c code

2003-12-01 Thread Ramprasad A Padmanabhan
On Mon, 2003-12-01 at 22:02, Robert Brown wrote: > Sounds like you are trying to write a harvesting tool to build a > spammer's email address list to me. Since you want to do it in C, I > suspect that either you have a huge amount of text to parse, probably > from web pages and news group posting

Re: CGI - DBI

2003-12-01 Thread Casey West
Hi. I'm acting on behalf of Casey West, a list admin, to assist you with your question. I've taken the liberty to search Google using the Subject line you provided in your email to the list. I hope one of the links below will be of service to you. I know we all do research before posting here, in

Re: Encrypting PERL source code...

2003-12-01 Thread drieux
On Dec 1, 2003, at 2:33 PM, R. Joseph Newton wrote: [..] Aaaah, Paul, I don't know. If you're going to do that, you might as well make an articulate statement in the process. I would recommend Acme Bushisms instead. for those who are playing along at home,

Re: Can' t read all bytes from Socket

2003-12-01 Thread Bob Showalter
Kipp, James wrote: > Hi > I have simple client/server socket scripts that that send some data > from the server to the client. It works fine, except the client can't > seem to read more than 2920 bytes from the server using sysread(). So > the data I am sending over gets cut off. Here is the releva

Re: Can' t read all bytes from Socket

2003-12-01 Thread drieux
On Dec 1, 2003, at 1:27 PM, James Edward Gray II wrote: On Dec 1, 2003, at 2:36 PM, drieux wrote: [..] personally I LOVE andrew gaffney's tighter solution which I would of course modify minutely to: while($bytes = sysread(SOCK,$buf,$buf_len)) { $data .= $buf; } There

Re: Encrypting PERL source code...

2003-12-01 Thread R. Joseph Newton
Paul Johnson wrote: > Don't remove the whitespace; whitespace is useful. Instead you want to > remove all the other characters. You want Acme::Bleach from CPAN. > > perldoc -q "hide the source" > > -- > Paul Johnson - [EMAIL PROTECTED] Aaaah, Paul, I don't know. If you're going to do that, you

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 3:29 PM, McMahon, Chris wrote: I happened to be working on a TCP/IP server when this hit my desk and having Programming Perl open to the correct page, thought I might as well quote the "select..." line from the client code... select ((select(Server), $| = 1)[0]; print Server

RE: Can' t read all bytes from Socket

2003-12-01 Thread McMahon, Chris
I happened to be working on a TCP/IP server when this hit my desk and having Programming Perl open to the correct page, thought I might as well quote the "select..." line from the client code... select ((select(Server), $| = 1)[0]; print Server "Howdy\n"; $answer = ; from

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 2:36 PM, drieux wrote: one way simplistic way to try the sysread() approach would be go with something like my $message; my $bytes=1; while ($bytes) { $bytes = sysread(SOCK,$buf,4096); $message .= $buf; #

RE: Can' t read all bytes from Socket

2003-12-01 Thread Kipp, James
> one way simplistic way to try the sysread() approach > would be go with something like > > my $message; > > my $bytes=1; > while ($bytes) > { > $bytes = sysread(SOCK,$buf,4096); > $message .= $buf; > # or try say >

Re: using perl in a c code

2003-12-01 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: > > I am writing a c program In which I have some heavy text parsing to do. > Unfortunately I am not very conversant with C or Regex in C You can use Perl's regular expressions in C: http://www.regular-expressions.info/pcre.html > I have read about embedding perl

Re: fixed width variable -Thanks

2003-12-01 Thread Jeff Tillotson
Thanks for everyone's quick response to my query. regards, Jeff Jeff Tillotson wrote: Greetings, I have been searching for a way to do this and have not had any luck. I am using localtime() to determine the day of the month. I need to make sure the variable it returns will always be 2 digits and

Re: using perl in a c code

2003-12-01 Thread david
Ramprasad A Padmanabhan wrote: > I am writing a c program In which I have some heavy text parsing to do. > Unfortunately I am not very conversant with C or Regex in C > > I have read about embedding perl into C programs, > > Now How Can I do this efficiently > > Suppost I want to parse a Mail T

Re: fixed width variable

2003-12-01 Thread Andrew Gaffney
Jeff Tillotson wrote: Greetings, I have been searching for a way to do this and have not had any luck. I am using localtime() to determine the day of the month. I need to make sure the variable it returns will always be 2 digits and padded with zeros. For example currently it is like: $var

Re: Can' t read all bytes from Socket

2003-12-01 Thread drieux
On Dec 1, 2003, at 12:31 PM, Kipp, James wrote: Yes, make sense, but not sure how to "check". Is this where select() comes in? Let me know if you want to see the entire code I am currently working with. p0: USE IO::Select, it will help especially if you wind up needing to deal with more than one

RE: Can' t read all bytes from Socket

2003-12-01 Thread Kipp, James
> > Yes, make sense, but not sure how to "check". Is this where > select() > > comes > > in? > > You got it. > > > Let me know if you want to see the entire code I am > currently working > > with. > > Sure, especially if your client and server are small, post > away. Tell > me what you're

RE: fixed width variable

2003-12-01 Thread Kipp, James
> > Greetings, > I have been searching for a way to do this and have not had any luck. > > I am using localtime() to determine the day of the month. I need to > make sure the variable it returns will always be 2 digits and padded > with zeros. For example currently it is like: > $var =

RE: fixed width variable

2003-12-01 Thread Tim Johnson
perldoc -f sprintf This function will do what you want. -Original Message- From: Jeff Tillotson [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 12:36 PM To: [EMAIL PROTECTED] Subject: fixed width variable Greetings, I have been searching for a way to do this and have not had

RE: fixed width variable

2003-12-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jeff Tillotson wrote: > Greetings, > I have been searching for a way to do this and have not had any luck. > > I am using localtime() to determine the day of the month. I need to > make sure the variable it returns will always be 2 digits and padded > with zeros. For example currently it is like

Re: Can' t read all bytes from Socket

2003-12-01 Thread Andrew Gaffney
Kipp, James wrote: Thanks. I tried turning off buffering on both ends, that did not work. In your example, you only call sysread() once. Is that how you were doing it? If so, that's the mistake. The one call got you part of the data. Then you would loop, check and eventually call again to

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 2:31 PM, Kipp, James wrote: Thanks. I tried turning off buffering on both ends, that did not work. In your example, you only call sysread() once. Is that how you were doing it? If so, that's the mistake. The one call got you part of the data. Then you would loop, check and

Re: Can' t read all bytes from Socket

2003-12-01 Thread drieux
On Dec 1, 2003, at 12:18 PM, James Edward Gray II wrote: [..] If you can get by with the line oriented reads and writes, by all means use them and save yourself a lot of pain. That's rare in networking though, in my experience. If you really do need sysread(), you'll need to check it with select()

fixed width variable

2003-12-01 Thread Jeff Tillotson
Greetings, I have been searching for a way to do this and have not had any luck. I am using localtime() to determine the day of the month. I need to make sure the variable it returns will always be 2 digits and padded with zeros. For example currently it is like: $var = (localtime)[3]; $var wo

RE: Can' t read all bytes from Socket

2003-12-01 Thread Kipp, James
> > > Thanks. I tried turning off buffering on both ends, that > did not work. > > In your example, you only call sysread() once. Is that how you were > doing it? If so, that's the mistake. The one call got you > part of the > data. Then you would loop, check and eventually call again >

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 2:25 PM, Kipp, James wrote: select(), I was afraid somebody would mention that :) The dreaded select() isn't as scary as it sounds, especially if you use the IO::Select module. If you like books, Network Programming with Perl is superb and covers all this well. Good luck. J

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 2:25 PM, Kipp, James wrote: Yes. Calling sysread() gets you what's ready to be read UP TO the amount of data you specify. The rest probably just wasn't available yet. There could be a lot of reasons for this: network lag, operating system buffers, etc. Thanks. I tried turnin

RE: Can' t read all bytes from Socket

2003-12-01 Thread Kipp, James
>> Yes. Calling sysread() gets you what's ready to be read UP TO the > amount of data you specify. The rest probably just wasn't available > yet. There could be a lot of reasons for this: network lag, > operating > system buffers, etc. Thanks. I tried turning off buffering on both ends, t

Re: Can' t read all bytes from Socket

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 2:02 PM, Kipp, James wrote: Hi I have simple client/server socket scripts that that send some data from the server to the client. It works fine, except the client can't seem to read more than 2920 bytes from the server using sysread(). So the data I am sending over gets cut of

Can' t read all bytes from Socket

2003-12-01 Thread Kipp, James
Hi I have simple client/server socket scripts that that send some data from the server to the client. It works fine, except the client can't seem to read more than 2920 bytes from the server using sysread(). So the data I am sending over gets cut off. Here is the relevant code: --- connect(SOCK, $

Re: i am a begnner

2003-12-01 Thread Saskia van der Elst
On Monday 01 December 2003 11:17, paulo wrote: > where can I find a how to abou perl? Quoting R. Joseph Newton: One thing that might be worth trying is to do something like the following: perldoc perlfaq > "perldoc/perlfaq.txt". That will give you a plain-text readout of the questions in each FA

i am a begnner

2003-12-01 Thread paulo
where can I find a how to abou perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Encrypting PERL source code...

2003-12-01 Thread Bakken, Luke
> -Original Message- > From: [EMAIL PROTECTED] > > Can anyone suggest where I might be able to find (hopefully a freeware > or shareware script..) a program that runs either on a > windows system or > a PERL script that would "encrypt" a perl script by doing > such things as > removing

Re: Encrypting PERL source code...

2003-12-01 Thread Tassilo von Parseval
On Mon, Dec 01, 2003 at 01:39:43PM -0500 [EMAIL PROTECTED] wrote: > Can anyone suggest where I might be able to find (hopefully a freeware > or shareware script..) a program that runs either on a windows system or > a PERL script that would "encrypt" a perl script by doing such things as > removin

Re: Encrypting PERL source code...

2003-12-01 Thread Paul Johnson
On Mon, Dec 01, 2003 at 01:39:43PM -0500, [EMAIL PROTECTED] wrote: > Can anyone suggest where I might be able to find (hopefully a freeware > or shareware script..) a program that runs either on a windows system or > a PERL script that would "encrypt" a perl script by doing such things as > removi

RE: Encrypting PERL source code...

2003-12-01 Thread Tom Kinzer
even better, check out PAR: http://search.cpan.org/~autrijus/PAR/ -Tom Kinzer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 10:40 AM To: [EMAIL PROTECTED] Subject: Encrypting PERL source code... Can anyone suggest where I might

Encrypting PERL source code...

2003-12-01 Thread Richard.C.1
Can anyone suggest where I might be able to find (hopefully a freeware or shareware script..) a program that runs either on a windows system or a PERL script that would "encrypt" a perl script by doing such things as removing whitespace, etc. so that it is much more difficult to read but yet will

Re: Zero Rreferences (was:Stupid Question)

2003-12-01 Thread drieux
On Nov 30, 2003, at 11:25 PM, R. Joseph Newton wrote: drieux wrote: [..] Pathological cases can arise within any system. yes, but they keep allowing the primates to code... 8-) [..] I haven't really searched on the problem, because it hasn't arisen. Until this morning, when I cooked up that memory

CGI - DBI

2003-12-01 Thread Jerry Rocteur
Hi, I'm enjoying writing scripts using DBI, I'm doing it with Sybase and MySQL and it is a whole lot of fun. I'd like to stick some stuff on the web and I've started playing with CGI but I hate this, almost as much as I hate creating HTML docs ;-) Anyway, I decided not to re-invent the wheel a

Re: Command line Syntax

2003-12-01 Thread drieux
On Dec 1, 2003, at 3:41 AM, Manish Uskaikar wrote: I want to do a simple search replace on a unix command prompt. What i require is a syntax to do is? echo "I am Manish"| output I am Jeff. jeff, I am drieux. What I would recommend is something old school, in which you go with something like c

Weekly list FAQ posting

2003-12-01 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: using perl in a c code

2003-12-01 Thread drieux
On Dec 1, 2003, at 6:22 AM, Ramprasad A Padmanabhan wrote: [..] Instead Can I just embed this perl code in my c program I will be happy if someone can give some links to examples on the net HTH. ciao drieux --- -- To unsubscribe, e-mail: [EMAI

Re: Doubt

2003-12-01 Thread drieux
On Dec 1, 2003, at 6:19 AM, Na wrote: I am programmer and work with language VB. But I have some doubts about Perl and in the internet I did not find solutions. I like to know if is possible to use dll's I writed (that access a usb scanner) in perl. If I could, how can i referenciate it (in vbscr

using perl in a c code

2003-12-01 Thread Robert Brown
Sounds like you are trying to write a harvesting tool to build a spammer's email address list to me. Since you want to do it in C, I suspect that either you have a huge amount of text to parse, probably from web pages and news group postings, or you need to write a tool that will run inside of a w

Re: Net::SSH and Net::FTP?

2003-12-01 Thread Wiggins d Anconia
> > I would like to use SSH to login to a remote system, then using FTP, > upload a file from the remote machine to another machine which will > display the data. If I can automate this process, I think I'll be in > great shape, tell me does this code seem like it would work for this? > >use Net

Doubt

2003-12-01 Thread Na
I am programmer and work with language VB. But I have some doubts about Perl and in the internet I did not find solutions. I like to know if is possible to use dll's I writed (that access a usb scanner) in perl. If I could, how can i referenciate it (in vbscript we use the CreateObject method)?

Re: Command line Syntax

2003-12-01 Thread James Edward Gray II
On Dec 1, 2003, at 8:06 AM, Ramprasad A Padmanabhan wrote: There must be a better way but what comes to my mind is echo "I am Manish" | perl -e 'while(<>){ s/Manish/Jeff/g ; print "$_"}' echo "I am Manish" | perl -pe 's/Manish/Jeff/g' James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

using perl in a c code

2003-12-01 Thread Ramprasad A Padmanabhan
I am writing a c program In which I have some heavy text parsing to do. Unfortunately I am not very conversant with C or Regex in C I have read about embedding perl into C programs, Now How Can I do this efficiently Suppost I want to parse a Mail To: header and want to extract the emailid like t

Re: Command line Syntax

2003-12-01 Thread Ramprasad A Padmanabhan
Manish Uskaikar wrote: Hi, I want to do a simple search replace on a unix command prompt. What i require is a syntax to do is? echo "I am Manish"| output I am Jeff. Please help. Regards Manish U -- The information contained in this message is confidential and prop

Command line Syntax

2003-12-01 Thread Manish Uskaikar
Hi, I want to do a simple search replace on a unix command prompt. What i require is a syntax to do is? echo "I am Manish"| output I am Jeff. Please help. Regards Manish U -- The information contained in this message is confidential and proprietary to KnowledgeW

Net::SSH and Net::FTP?

2003-12-01 Thread Mark Weisman
I would like to use SSH to login to a remote system, then using FTP, upload a file from the remote machine to another machine which will display the data. If I can automate this process, I think I'll be in great shape, tell me does this code seem like it would work for this? >use Net::SSH::Perl; >

Re: Zero Rreferences (was:Stupid Question)

2003-12-01 Thread R. Joseph Newton
drieux wrote: > On Nov 30, 2003, at 2:39 PM, R. Joseph Newton wrote: > > > Does the difference between the two memory readings represent a memory > leak? > > > > I think that is unlikely. If it were a true memory leak, it would have > taken a much geater toll. More like the OS simply lets > th