Re: Pattern matching

2007-02-21 Thread Dr.Ruud
"Dharshana Eswaran" schreef: > TAPI_VOICE_NOTIFY_OTHERAPP_JOINING_MSGID > TAPI_TTY_NOTIFY_TTY_TONE_MSGID > [...] > Can anyone help me in getting a generalised pattern from these? m/^ TAPI (?:_[A-Z]+)+ $/x -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: system and list of arguments

2007-02-21 Thread Dr.Ruud
Mathew Snyder schreef: > system("shredder","--force","--plugin" > "Tickets=arg1,desc;arg2,desc;arg3,desc") Alternative: system qw/shredder --force --plugin/ , q/Tickets=arg1,desc;arg2,desc;arg3,desc/; Variant: { no warnings q/qw/; system qw/shredder --force --plugin Tickets=arg

Re: Pattern matching

2007-02-21 Thread Dharshana Eswaran
On 2/21/07, Dr.Ruud <[EMAIL PROTECTED]> wrote: "Dharshana Eswaran" schreef: > TAPI_VOICE_NOTIFY_OTHERAPP_JOINING_MSGID > TAPI_TTY_NOTIFY_TTY_TONE_MSGID > [...] > Can anyone help me in getting a generalised pattern from these? m/^ TAPI (?:_[A-Z]+)+ $/x -- Affijn, Ruud "Gewoon is een tijger.

Re: Pattern matching

2007-02-21 Thread Dharshana Eswaran
On 2/21/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: On 2/21/07, Dr.Ruud <[EMAIL PROTECTED]> wrote: > > "Dharshana Eswaran" schreef: > > > TAPI_VOICE_NOTIFY_OTHERAPP_JOINING_MSGID > > TAPI_TTY_NOTIFY_TTY_TONE_MSGID > > [...] > > Can anyone help me in getting a generalised pattern from thes

Sharing Threds or in memory database

2007-02-21 Thread Armin ranjbar
Hi all ;) im working on high performance dns server using perl , its nearly completed but i had some very urgent and bad looking problem , well , im using single hash value to store all queries , for example $mhash{"kernel.org"}{"MX"} returns cached MX query of kernel.org , the problem is ,

Re: Sharing Threds or in memory database

2007-02-21 Thread Jeff Pang
> >im working on high performance dns server using perl , its nearly completed >but i had some very urgent and bad looking problem , >well , im using single hash value to store all queries , for example > >$mhash{"kernel.org"}{"MX"} returns cached MX query of kernel.org , the problem >is , th

Re: Is there any way to use C header files in perl program?

2007-02-21 Thread Jay Savage
On 2/21/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: On 2/20/07, Peter Scott <[EMAIL PROTECTED]> wrote: > > On Tue, 20 Feb 2007 12:19:22 +0530, Dharshana Eswaran wrote: > > > Hello All, > > > > I need to use a C header file in Perl program in Unix. > > > > Is it possible to use the header fil

Re: Sharing Threds or in memory database

2007-02-21 Thread Jenda Krynicky
From: Armin ranjbar <[EMAIL PROTECTED]> > im working on high performance dns server using perl , its nearly > completed but i had some very urgent and bad looking problem , well , > im using single hash value to store all queries , for example > > $mhash{"kernel.org"}{"MX"} returns cached MX que

Re: Installing modules locally, how to

2007-02-21 Thread Peter Scott
On Tue, 20 Feb 2007 11:41:41 -0500, Moon, John wrote: > Looking for help installing modules to a "local" library... You've got multiple problems below. > Below are several attempts. > > Any suggestions or links to "How to..." will be greatly appreciated. > > SUN83-PRODWEB>pwd > /opt/common/htm

help accessing NDBM database files

2007-02-21 Thread RICHARD FERNANDEZ
Hi folks, I'm working on a script in which I want to access NDBM files directly. I'm using the unix aliases file(s) for testing, but I intend to use this code for other projects as well. I have the following files: aliases, aliases.dir, and aliases.pag. According to the man page for aliases, thes

Re: help accessing NDBM database files

2007-02-21 Thread Tom Phoenix
On 2/21/07, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: I have the following files: aliases, aliases.dir, and aliases.pag. According to the man page for aliases, these are "ndbm files maintained by newaliases". That man page might be lying to you. If you have a pair of .dir/.pag files, those

Perl Parsing

2007-02-21 Thread Sumit Shah
Hello All, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Thanks Sumit -- To unsubscribe, e-mail: [EMAIL PROTECTED]

setuid not working with quotes

2007-02-21 Thread Gsandtner Michael
I have a problem with setuid script. I have tracked down to the following example. A perl script is setuid, calls another, not setuid script with system. If the argument contain a quote, setuid is not performed, otherwise it is set. cd /home/foo cat >suid-example <<'_end' #!/usr/bin/perl print STD

Re: Perl Parsing

2007-02-21 Thread David Moreno Garza
Sumit Shah wrote: > I have a string like: 'a = 1; b = 2; c = 3; d = 4' my($c) = $string =~ /c = (\d)/; Maybe? -- David Moreno Garza <[EMAIL PROTECTED]> | http://www.damog.net/ Una vida sencilla para nada es aburrida. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: setuid not working with quotes

2007-02-21 Thread Tom Phoenix
On 2/21/07, Gsandtner Michael <[EMAIL PROTECTED]> wrote: system("/home/foo/nosuid-example arg"); system("/home/foo/nosuid-example \"arg\""); The difference between these two is that the first runs the example program, but the second runs a shell and asks it to run the example program. When yo

RE: help accessing NDBM database files

2007-02-21 Thread RICHARD FERNANDEZ
> That man page might be lying to you. If you have a pair of > .dir/.pag files, those are probably a DBM file, not NDBM. > Have you tried DB_File? > > Hope this helps! > > --Tom Phoenix > Stonehenge Perl Training > I substitued DB_File for NDBM_File and changed the code appropriately, but I'm

Re: string manip.

2007-02-21 Thread Nishi Bhonsle
Hi: In case the string i am looking for is secondlast position as in instance/bit/bitGroup/default/tz/l_cs/messages How can i change the manip code to get l_cs in this case? Thanks! On 2/16/07, John W. Krahn <[EMAIL PROTECTED]> wrote: Nishi Bhonsle wrote: > Hi: Hello, > I have a string su

Re: help accessing NDBM database files

2007-02-21 Thread Mumia W.
On 02/21/2007 10:27 AM, RICHARD FERNANDEZ wrote: Hi folks, I'm working on a script in which I want to access NDBM files directly. I'm using the unix aliases file(s) for testing, but I intend to use this code for other projects as well. I have the following files: aliases, aliases.dir, and alias

RE: help accessing NDBM database files

2007-02-21 Thread RICHARD FERNANDEZ
> Probably rfernandez is not a valid key in the database file. Try this: > > tie my %db, 'NDBM_File', 'aliases', O_RDWR, 0644; > > while (my ($key, $value) = each %db) { > print "$key => $value\n"; > } > > untie %db; > > On my system, this code works with a custom a

Re: string manip.

2007-02-21 Thread John W. Krahn
Nishi Bhonsle wrote: > > On 2/16/07, John W. Krahn <[EMAIL PROTECTED]> wrote: >> Nishi Bhonsle wrote: >> >> > I have a string such as >> > instance/bit/bitGroup/default/tz/l_cs >> > where the last directory stands for os languages. >> > >> > I have to get the last directory and assign it to a var

Re: help accessing NDBM database files

2007-02-21 Thread Mumia W.
On 02/21/2007 03:49 PM, RICHARD FERNANDEZ wrote: Probably rfernandez is not a valid key in the database file. Try this: tie my %db, 'NDBM_File', 'aliases', O_RDWR, 0644; while (my ($key, $value) = each %db) { print "$key => $value\n"; } untie %db; On my system, th

Re: help accessing NDBM database files

2007-02-21 Thread Jay Savage
On 2/21/07, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Probably rfernandez is not a valid key in the database file. Try this: > > tie my %db, 'NDBM_File', 'aliases', O_RDWR, 0644; > > while (my ($key, $value) = each %db) { > print "$key => $value\n"; > } > > untie

Re: sendmail

2007-02-21 Thread JupiterHost.Net
Jeff Pang wrote: I need to send mail to all users defined in one array. I tried foreach loop but what is happening is it is sending mail to only first user in the array. not sending mails to rest of the users. Is there any way to send a mail to all users in array in one shot. I am using send

Re: Perl Parsing

2007-02-21 Thread JupiterHost.Net
Sumit Shah wrote: Hello All, Heloo, I have a string like: 'a = 1; b = 2; c = 3; d = 4' Whats the best way to parse it so that I can get a value for c, which is 3? I have used the hash approach. But, I was wondering if there is a faster way to do it in Perl. Why do you say hashes are sl

Re: Pattern matching

2007-02-21 Thread Dr.Ruud
"Dharshana Eswaran" schreef: > m/^ #TAPI (?:_[A-Z]+)+ $/x > > But this is filtering both the strings starting from TAPI and the > strings starting from #TAPI. Yes, "#" starts a comment, so makes the regex equivalent to m/^/, which will allways match. echo 'abc' | perl -nle ' /^ # tes

Re: Sharing Threds or in memory database

2007-02-21 Thread Dr.Ruud
Armin ranjbar schreef: > im working on high performance dns server using perl , its nearly > completed but i had some very urgent and bad looking problem , > well , im using single hash value to store all queries , for example > > $mhash{"kernel.org"}{"MX"} returns cached MX query of kernel.org

2 modules share each other's methods, is that safe ?

2007-02-21 Thread Mug
Hello List, My question is if this work safe ? Here I have the way to use 2 modules and shares their methods cross along, because I don't want to split out the common part as another package, since there are class properties inside. If I split out something, I have to rebuild the object again in