Re: LM an NT hashes

2004-09-23 Thread Luis Daniel Lucio Quiroz
I has my self, I found Crypt-Smb moduloe por perl, for those that use MDK I buid the SRPM at http://www.linuxchange.com/download/Mandrake%20Official%2010/samba/Perl-Crypt-Smb-0.02-1mdk.src.rpm CU LD Le jeudi 23 Septembre 2004 20:15, Luis Daniel Lucio Quiroz a écrit : > I wonder if someone has

RE: regex help

2004-09-23 Thread Johnstone, Colin
Thank you I musthave just coded something wrong, your right they do work. Sorry! -Original Message- From: Raymond Raj [mailto:[EMAIL PROTECTED] Sent: Friday, September 24, 2004 3:55 PM To: Johnstone, Colin; [EMAIL PROTECTED] Subject: RE: regex help Hi! what's problem in these regular ex

RE: regex help

2004-09-23 Thread Raymond Raj
Hi! what's problem in these regular expressions.. every thing correct! do you need to convert one or more than one match into single replacement then regexp should be $safeString =~ s/\s+/_/g; -Original Message- From: Johnstone, Colin [mailto:[EMAIL PROTECTED] Sent: Friday, September

Re: regex help

2004-09-23 Thread Ramprasad A Padmanabhan
On Fri, 2004-09-24 at 11:01, Johnstone, Colin wrote: > Gidday all, > > Im trying to write a regex to convert spaces to underscores and ampersands to 'and' > can someone help. > > $safeString = "News & Events"; > $safeString =~ s/&/and/g; > $safeString =~ s/\s/_/g; > > Regards > > Colin > W

RE: regex help

2004-09-23 Thread Johnstone, Colin
I worked it out myself $safeString = "News & Events"; $safeString =~ s!&!and!g; $safeString =~ s!\s!_!g; thank you Colin -Original Message- From: Johnstone, Colin Sent: Friday, September 24, 2004 3:32 PM To: [EMAIL PROTECTED] Subject: regex help Gidday all, Im try

regex help

2004-09-23 Thread Johnstone, Colin
Gidday all, Im trying to write a regex to convert spaces to underscores and ampersands to 'and' can someone help. $safeString = "News & Events"; $safeString =~ s/&/and/g; $safeString =~ s/\s/_/g; Regards Colin This E-Mail is intended only for the addressee. Its use is limited to that inten

RE: import from text file to mysql

2004-09-23 Thread Raymond Raj
>my $sth=$dbh->prepare(" LOAD DATA LOCAL INFILE "/home/roime/MYSQL_PERL/IN_NETWORK/packet.txt" INTO TABLE flow FIELDS TERMINATED BY ',' "); here you had forgot escape the double quotes,should be escaped quotes: \"/home/roime/MYSQL_PERL/IN_NETWORK/packet.txt\" my $sth=$dbh->prepa

RE: import from text file to mysql

2004-09-23 Thread Roime bin Puniran
I am sorry that not showing u a detail at least, about my text file...Here is te sample of my text file... === "1.200.200.202.157 2.200.200.250.7 3.0 4.255 5.8 6.1109 7.0 8.0 9.1095648052.771 10.1095648052.979 11.1417 12.44

LM an NT hashes

2004-09-23 Thread Luis Daniel Lucio Quiroz
I wonder if someone has perl functions to make LM and NT hashes that samba uses. Best regards, LD -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: import from text file to mysql

2004-09-23 Thread Chris Devers
* Please don't top-quote. * Perl is a language, perl is a program, PERL isn't a word. On Fri, 24 Sep 2004, Roime bin Puniran wrote: > i have several packet that captured from monitoring process...Then we > save it in txt format...And now, i need to import it into mysql, by > that way i can ma

RE: import from text file to mysql

2004-09-23 Thread Roime bin Puniran
i have several packet that captured from monitoring process...Then we save it in txt format...And now, i need to import it into mysql, by that way i can make a report esily...How i can import it using PERL ?... Thanks -Original Message- From: Chris Devers [mailto:[EMAIL PROTECTED] Se

Re: import from text file to mysql

2004-09-23 Thread Chris Devers
On Fri, 24 Sep 2004, Roime bin Puniran wrote: > how to import text file to mysql using Perl ?. What is in the text file? We can't begin to help you without knowing what the file contains. Ignoring Perl for a minute, have you considered using the MySQL command line tool `mysqlimport` ? It has l

import from text file to mysql

2004-09-23 Thread Roime bin Puniran
how to import text file to mysql using PERL ?. This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of t

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
C R wrote: Gunnar Hjalmarsson wrote: C R wrote: Are you certain that using the module makes the simultaneous matching faster than a sequential and to what degree (roughly)? Certain? Certainly not. :) It depends, among other things, on your systems ability to run parallel processes and on the size

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-23 Thread Chris Devers
Please send all replies to the list, not me directly. Thanks. On Thu, 23 Sep 2004, Ajey Kulkarni wrote: > Thanks a bunch Chris. I FORCED the pms to be copied. > I'll try to install this and get it running. It usually isn't a good idea to force an install unless you understand what the error you

Re: speed up string matching

2004-09-23 Thread c r
Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Gunnar Hjalmarsson wrote: >> C R wrote: >>> Question2: is the "fork" function what I should use in order to >>> match a string with multiple expressions simultaneously? >> >> Maybe, if the string is really, really log. You may e.g. want to >> check

Re: How to slice a split directly?

2004-09-23 Thread Jenda Krynicky
From: "Wiggins d Anconia" <[EMAIL PROTECTED]> > > This works and does what I want it to: > > > > perl -e '@x = split("\\.", "a.b.c"); print $x[0];' > > > > Why does not this work? > > perl -e 'print @{split("\\.", "a.b.c")}[0];' > > > > Is there a compact way to take a slice of a split (or othe

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
[ Please 'bottom-post', i.e. type your reply below the quoted part of the message you are replying to. Also, don't quote the whole message, but only the part(s) needed for context. ] C R wrote: Gunnar Hjalmarsson wrote: C R wrote: Question2: is the "fork" function what I should use in order to matc

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
> On Thu, 23 Sep 2004, Errin Larsen wrote: > > > [] I was looking for a daemon that would run, start other servers, > > and that hang around monitoring them. > > In other words, you want something that works like Apache [1.x]. > > * To launch Apache, you run apachectl, a shell script. >

RE: speed up string matching

2004-09-23 Thread c r
c r <[EMAIL PROTECTED]> wrote:Thanks for replying! Thomas Bätzler <[EMAIL PROTECTED]> wrote: Hi, c r asked: > I need to match an expression and its reverse to a very long string. > When a match occurs all matching should stop and the position > of the match should be returned. Could you ple

Re: Daemon that starts other Daemons

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Errin Larsen wrote: > [] I was looking for a daemon that would run, start other servers, > and that hang around monitoring them. In other words, you want something that works like Apache [1.x]. * To launch Apache, you run apachectl, a shell script. * apachectl laun

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
> Hi again, > > Ok ... so with some research and playi^H^H^H^H^Htesting I've found the > answer to what's really been bothering me. If I fork(), I get the PID > of the resulting child. However, if THAT child runs and external > command, how do I get the (now grand)child's PID. The answer I was

Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
-- Forwarded message -- From: Errin Larsen <[EMAIL PROTECTED]> Date: Thu, 23 Sep 2004 16:30:21 -0500 Subject: Re: Daemon that starts other Daemons To: Wiggins d Anconia <[EMAIL PROTECTED]> Hi again, Ok ... so with some research and playi^H^H^H^H^Htesting I've found the answer to w

Re: speed up string matching

2004-09-23 Thread c r
c r <[EMAIL PROTECTED]> wrote:Thanks for replying! Are you certain that using the module makes the simultaneous matching faster than a sequential and to what degree (roughly)? Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: C R wrote: > I need to match an expression and its reverse to a very l

Re: How to slice a split directly?

2004-09-23 Thread Wiggins d Anconia
> This works and does what I want it to: > > perl -e '@x = split("\\.", "a.b.c"); print $x[0];' > > Why does not this work? > perl -e 'print @{split("\\.", "a.b.c")}[0];' > > Is there a compact way to take a slice of a split (or other function that > returns an array) without creating a tempora

Calling Perl From Java?

2004-09-23 Thread Siegfried Heintze
I did a google search on calling Perl from Java. I found one site (http://ebb.org/perljvm/) that suggested the most promising project tackling this problem had been abandoned. The traditional approach is apparently very cumbersome: Have Java call C and C all Perl. This sounds very tedious. Does t

Re: How to slice a split directly?

2004-09-23 Thread Jenda Krynicky
From: "Siegfried Heintze" <[EMAIL PROTECTED]> > This works and does what I want it to: > > perl -e '@x = split("\\.", "a.b.c"); print $x[0];' > > Why does not this work? > perl -e 'print @{split("\\.", "a.b.c")}[0];' > > Is there a compact way to take a slice of a split (or other function > tha

Re: How to slice a split directly?

2004-09-23 Thread William Gunther
On Thu, 23 Sep 2004 13:43:08 -0600, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > This works and does what I want it to: > > perl -e '@x = split("\\.", "a.b.c"); print $x[0];' > > Why does not this work? > perl -e 'print @{split("\\.", "a.b.c")}[0];' Because split doesn't return an array refer

How to slice a split directly?

2004-09-23 Thread Siegfried Heintze
This works and does what I want it to: perl -e '@x = split("\\.", "a.b.c"); print $x[0];' Why does not this work? perl -e 'print @{split("\\.", "a.b.c")}[0];' Is there a compact way to take a slice of a split (or other function that returns an array) without creating a temporary variable? T

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
> On Thu, 23 Sep 2004 11:23:16 -0500, Errin Larsen <[EMAIL PROTECTED]> wrote: > > Hi perl-people, > > <> > > > So, my question is, how do I implement this code WITHOUT the parent > > process dieing? > > > > --Errin > > > > I found that (at least on the Solaris OS that I'm working on) that the

Re: Daemon that starts other Daemons

2004-09-23 Thread Wiggins d Anconia
> Hi perl-people, > > I'm not sure if this is beginners stuff, but I'll post here 'cause > it's the only list I'm subscribed to at the moment. > A stretch, but there have been more complex topics discussed. This is pretty much a catch all and some of the experts will probably appreciate not answ

Re: XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Ajey Kulkarni wrote: > XMLin() requires either XML::SAX or XML::Parser at line number blah blah. > I actually copied these two perl modules in the right place but still then > my script is not able to find these.(in @INC). What is XMLin() ? Ahh, I see, it's a method provide

XMLin() not finding XML::SAX or XML::Parser modules Problem

2004-09-23 Thread Ajey Kulkarni
Hi, XMLin() requires either XML::SAX or XML::Parser at line number blah blah. I actually copied these two perl modules in the right place but still then my script is not able to find these.(in @INC). I'm trying to call this XMLin() function from another perl module. Am i missing anything here? An

Re: Optimize Problem

2004-09-23 Thread Gavin Henry
Millhost said: > Dear All > > I am using this script to get my maillog information > > ## > %IP_LOG=(); > open (LOG,/var/log/maillog); > foreach () { > if (/Sep 20/) { > $IP_LOG{$_}++; > } > } > ## > I found this script will take 3-4 second when my log file in 40MB > But I try using gerp "Sep 20" /

Re: Optimize Problem

2004-09-23 Thread Gavin Henry
Millhost said: > Dear All > > I am using this script to get my maillog information > > ## > %IP_LOG=(); > open (LOG,/var/log/maillog); > foreach () { > if (/Sep 20/) { > $IP_LOG{$_}++; > } > } > ## > I found this script will take 3-4 second when my log file in 40MB > But I try using gerp "Sep 20" /

Re: Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
On Thu, 23 Sep 2004 11:23:16 -0500, Errin Larsen <[EMAIL PROTECTED]> wrote: > Hi perl-people, <> > So, my question is, how do I implement this code WITHOUT the parent > process dieing? > > --Errin > I found that (at least on the Solaris OS that I'm working on) that the setsid function will set

Daemon that starts other Daemons

2004-09-23 Thread Errin Larsen
Hi perl-people, I'm not sure if this is beginners stuff, but I'll post here 'cause it's the only list I'm subscribed to at the moment. I'm writing a script that will daemonize itself, and then watch some processes. If one of those processes die, it will start it again. So, I've been reading the

RE: speed up string matching

2004-09-23 Thread Thomas Bätzler
Hi, c r <[EMAIL PROTECTED]> asked: > I need to match an expression and its reverse to a very long string. > When a match occurs all matching should stop and the position > of the match should be returned. Could you please illustrate this with an example or two? Unless you specify the /g modifi

Optimize Problem

2004-09-23 Thread Millhost
Dear All I am using this script to get my maillog information ## %IP_LOG=(); open (LOG,/var/log/maillog); foreach () { if (/Sep 20/) { $IP_LOG{$_}++; } } ## I found this script will take 3-4 second when my log file in 40MB But I try using gerp "Sep 20" /var/log/maillog in bash shell, it take 0.8

Re: starting position of RE match

2004-09-23 Thread Robert Citek
On Wednesday, Sep 22, 2004, at 08:05 US/Central, Jenda Krynicky wrote: Which means it's actually much easier than I had you believe: $s = "sasas dfgfgh asasas asedsase"; while ($s =~ /(?=sas)/g) { print "pos=",pos($s), " = '",substr($s,pos($s),3),"'\n"; } Bas

Re: speed up string matching

2004-09-23 Thread Gunnar Hjalmarsson
C R wrote: I need to match an expression and its reverse to a very long string. When a match occurs all matching should stop and the position of the match should be returned. Question1: can I match the forward and reverse expression to the string on the same time and You can make use of alternation

Image::Magick problem

2004-09-23 Thread Ing. Branislav Gerzo
Hi there, I hope someone is using Image::Magick here. I just installed it (win xp, active Perl...), I'm trying to anotate some text, here is my example script: use Image::Magick; my $colour1 = ("ff"); my $colour2 = ("ff"); my $text = ("Hello World"); my $image=Image::Magick->new; $image->

speed up string matching

2004-09-23 Thread c r
Hi! I need to match an expression and its reverse to a very long string. When a match occurs all matching should stop and the position of the match should be returned. Question1: can I match the forward and reverse expression to the string on the same time and thereby save half the time it no

Re: Calling Perl from C - Problem with DynaLoader

2004-09-23 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Paul Boyce) writes: >I am trying to call Perl from C. I hit a problem when I try to load >dynamic librarires. This is not a beginner level question. You'll find more experts who have the knowledge to answer it over on comp.lang.perl.misc. At l

Undefined symbol boot_DynaLoader, boot_Socket

2004-09-23 Thread Paul Boyce
Hi, I am trying to call Perl from C. I hit a problem when I try to load dynamic librarires. I have taken the following code from the PerlEmbed documentation (http://www.perldoc.com/perl5.8.4/pod/perlembed.html) but cannot get it to compile. This seems to be widely used stuff, so it sholdnt be

Calling Perl from C - Problem with DynaLoader

2004-09-23 Thread Paul Boyce
Hi, I am trying to call Perl from C. I hit a problem when I try to load dynamic librarires. I have taken the following code from the PerlEmbed documentation (http://www.perldoc.com/perl5.8.4/pod/perlembed.html) but cannot get it to compile. I am trying to play with parameters to the gcc compi