Re: Search Pattern for Roman Numerals?

2005-06-02 Thread Jeff 'japhy' Pinyan
On Jun 2, Siegfried Heintze said: How do I write a pattern for removing roman numerals? The first 10 is enough. Well, the first ten roman numerals are: I, II, III, IV, V, VI, VII, VIII, IX, X Just put those in a regex. s/\b(I|II|...)\b//g; would remove roman numerals, provided they are

Re: Argument passing between perl and a C function.

2005-06-02 Thread J aperlh
Siegfried, Thank you. I am sure it's a dispatch interface. On 6/3/05, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > J, > Is this a custom interface or a dispatch interface? I assumed it was a > dispatch interface. Perl and many other languages like VB and javascript > work well with dispatch in

problem with $1

2005-06-02 Thread Nischi
Hello The matched string which is stored in $1 is getting corrupted. the regular expression i have is "\xa0\xa0\xa0\x{100}" =~ /(\xa0+)/; when i say ... if($1 eq "\xa0\xa0\xa0") this is true. It is working fine in Linux but not working (ASCII platform) but it is not working in EBCIDIC pl

Search Pattern for Roman Numerals?

2005-06-02 Thread Siegfried Heintze
How do I write a pattern for removing roman numerals? The first 10 is enough. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Backtracking question

2005-06-02 Thread N. Ganesh Babu
Dear All, PRL IJB PRL CHA K. M. Cuomo and A. V. Oppenheim, Phys. Rev. Lett. 71, 65 (1993); L. Kocarev, K. S. Halle, K. Eckert, L. O. Chua, and U. Parlitz, Int. J. Bifurcation Chaos Appl. Sci. Eng. 2, 973 (1992); L. Kocarev and U. Parlitz, Phys. Rev. Lett. 74, 5028 (1995); N. F.

Re: Favorite packages for benchmarking?

2005-06-02 Thread John W. Krahn
Siegfried Heintze wrote: There are lots of packages for date-time computations. What is the best one for timing computations for benchmarks? I'm thinking I want to fetch the time in 64 bit format instead of year, mo, day, hour, min, sec, nano seconds (which is what most of the date-time packages

RE: Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Jeff 'japhy' Pinyan
On Jun 2, Siegfried Heintze said: s/\bJr\b/ Junior /gi; This is not exactly what I want because it will put a space before "Junior" even if Junior is at the beginning and I don't want a space? Just do s/\bJr\b/Junior/gi; The \b is an anchor -- it matches a location, not a character. -- J

RE: Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Siegfried Heintze
Thanks! Yes I want the \b. Now what about this: s/\bJr\b/ Junior /gi; This is not exactly what I want because it will put a space before "Junior" even if Junior is at the beginning and I don't want a space? I suppose I could do this: s/(\b)Jr(\b)/\1Junior\2/gi; Is there an easier way? Thanks

Re: $p{"Bryan"}{"age"} = 31

2005-06-02 Thread Bryan R Harris
Excellent! Perl is so cool! Thanks, Randal. - B >> "Bob" == Bob Showalter <[EMAIL PROTECTED]> writes: > > Bob> That's fine, as long as $p{Bryan} doesn't exist or is already a hashref. > Bob> See: http://c2.com/cgi/wiki?AutoVivification. > > And

RE: Argument passing between perl and a C function.

2005-06-02 Thread Siegfried Heintze
J, Is this a custom interface or a dispatch interface? I assumed it was a dispatch interface. Perl and many other languages like VB and javascript work well with dispatch interfaces because dispatch interfaces were specifically designed to accommodate languages like these. All dispatch interfaces

Re: Argument passing between perl and a C function.

2005-06-02 Thread J aperlh
--- Thanks for you guys help. There is an application written in C language by my colleague. We are not allowed to share this application for security reason. What I am going to do is to call a set of functions in this applic

Re: Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Jeff 'japhy' Pinyan
On Jun 2, Siegfried Heintze said: How do I search for the word "intern" without searching for "internal"? What I have been doing is /intern[^a]/ but that won't match /intern$/. You want to use a negative look-ahead: /intern(?!al)/ That means "match 'intern' that is not followed by 'al'".

Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Siegfried Heintze
How do I search for the word "intern" without searching for "internal"? What I have been doing is /intern[^a]/ but that won't match /intern$/. Thanks, Siegfried

Favorite packages for benchmarking?

2005-06-02 Thread Siegfried Heintze
There are lots of packages for date-time computations. What is the best one for timing computations for benchmarks? I'm thinking I want to fetch the time in 64 bit format instead of year, mo, day, hour, min, sec, nano seconds (which is what most of the date-time packages do). That should make subt

RE: A question about Win32:OLE

2005-06-02 Thread Siegfried Heintze
If it is in regedit, then it is probably in the OLE/COM viewer too. Have to clicked expert mode? There is a search feature in the OLE/COM viewer: if you just start typing the characters it will scroll down and search. If you wait too long between keystrokes, it will assume you want to start a new

RE: Argument passing between perl and a C function.

2005-06-02 Thread Siegfried Heintze
J, You need more information about the function that is contained in the IDL or the type library. Unfortunately, not all COM objects have an IDL file or type library. Both the IDL file and the type library would tell us exactly what the "*" means in C because it is ambiguous. The "*" could mean we

Re: invocant

2005-06-02 Thread Jeff 'japhy' Pinyan
On Jun 2, Matthew Sacks said: When you invoke a method, the first argument to the method equal to the method's invocant is automatically inserted. That sounds about right. The first argument to a method is either a class name or the object, depending on whether it's a class method or an obje

Re: require "sys/socket.ph";

2005-06-02 Thread John W. Krahn
Gayatri wrote: Sorry to trouble you again but John when I run like that it is giving error as follows "Couldn't disable Nagle's algorithm: Permission denied" The code is as follows. use Socket ':all'; socket($sock, AF_INET, SOCK_STREAM,$proto)||die "Socket call failed"; setsock

Re: invocant

2005-06-02 Thread Wiggins d'Anconia
Matthew Sacks wrote: > > Greetings: > > When you invoke a method, the first argument to the method equal to the > method's invocant is automatically inserted. > Correct. > i) Is this essentially the same as a C++ "this" pointer? > Yes, the Perl idiom generally looks like: sub method { my

invocant

2005-06-02 Thread Matthew Sacks
Greetings: When you invoke a method, the first argument to the method equal to the method's invocant is automatically inserted. i) Is this essentially the same as a C++ "this" pointer? ii) Apparently, the first argument can be a reference to its object, or the object. iii) There is an examp

Re: $p{"Bryan"}{"age"} = 31

2005-06-02 Thread Randal L. Schwartz
> "Bob" == Bob Showalter <[EMAIL PROTECTED]> writes: Bob> That's fine, as long as $p{Bryan} doesn't exist or is already a hashref. Bob> See: http://c2.com/cgi/wiki?AutoVivification. And . -- Randal L. Schwartz - Stonehenge Consulting

RE: please help me to check why this perl script does not work!

2005-06-02 Thread Chris Heiland
> -Original Message- > From: Fei Li [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 31, 2005 6:59 PM > To: Chris Heiland > Cc: beginners@perl.org > Subject: Re: please help me to check why this perl script > does not work! > > Hi, Chris, > > Thanks for your code. I have test in my

Re: background system call

2005-06-02 Thread sparciii
On 6/2/05, Tielman Koekemoer (TNE) <[EMAIL PROTECTED]> wrote: > > > Hey, > Hi > > > > > Within a perl script of mine, I'd like to execute a shell > > command but have it sleep for a few minutes prior to doing > > so. There are probably better ways but I can't think/find any > > at the moment to d

no. of bytes for each matching code pt in $1

2005-06-02 Thread Rajarshi Das
Hi, I run this on z/OS and perl-5.8.6. $a = 128; $b = 256; for ($i=$a;$i<=$b;$i++) { $str = join '', $str, pack 'U*', $i; } if ($str =~ /(\p{inlatin1supplement}+)/) { print "\$1 : $1\n"; } I get the following values : a) for $a = 128 $b = 256 $1 has 1 byte representations for each of (128-

Re: Finding matching HTML tags

2005-06-02 Thread Offer Kaye
On 6/2/05, Nilay Puri, Noida wrote: > Hi All, > > while reading a html file from perl script, I want to ensure that all HTML > tags have closing HTML tags. > If closing HTML tags are not there, then, I need to put the closing tag in > place. > > Can anyone guide in this regard ? > > Thanks & R

Finding matching HTML tags

2005-06-02 Thread Nilay Puri, Noida
Hi All, while reading a html file from perl script, I want to ensure that all HTML tags have closing HTML tags. If closing HTML tags are not there, then, I need to put the closing tag in place. Can anyone guide in this regard ? Thanks & Regards. Disclaimer: This message and any attachme

Re: SFTP

2005-06-02 Thread Ing. Branislav Gerzo
Octavian Rasnita [OR], on Thursday, June 2, 2005 at 13:59 (+0300) made these points: >> good luck with Net::SFTP under windoze. If you will have problems, >> just look to thread: mid:[EMAIL PROTECTED] OR> Can you tell me how to read the page with that thread? you can put that into google "[EMAIL

Re: SFTP

2005-06-02 Thread Octavian Rasnita
From: "Ing. Branislav Gerzo" <[EMAIL PROTECTED]> > good luck with Net::SFTP under windoze. If you will have problems, > just look to thread: mid:[EMAIL PROTECTED] > > -- Can you tell me how to read the page with that thread? Thank you very much. Teddy -- To unsubscribe, e-mail: [EMAIL PROTE

Re: before -

2005-06-02 Thread Ing. Branislav Gerzo
Brent Clark [BC], on Thursday, June 02, 2005 at 12:33 (+0200) contributed this to our collective wisdom: BC> Im trying to get the numbers before the hyphen BC> e.g. BC> 75664545-bookings BC> Can I use index() for this ? yes, you can use index for find index of "-" and after using substr to extra

Re: before -

2005-06-02 Thread Brent Clark
John W. Krahn wrote: Brent Clark wrote: Yes you could: $ perl -le' my $string = "75664545-bookings"; my $pre_hyphen = substr $string, 0, index $string, "-"; print $pre_hyphen; ' 75664545 Hi thanks for this Cant believed I struggled, for / with something so simple Regards Brent Clark -- To u

Re: before -

2005-06-02 Thread John W. Krahn
Brent Clark wrote: Hi all Hello, Im trying to get the numbers before the hyphen e.g. 75664545-bookings Can I use index() for this ? Yes you could: $ perl -le' my $string = "75664545-bookings"; my $pre_hyphen = substr $string, 0, index $string, "-"; print $pre_hyphen; ' 75664545 John -

Re: require "sys/socket.ph";

2005-06-02 Thread John W. Krahn
Gayatri wrote: Hello John, Hello, Thanks for ur Reply. But Now I am getting the following error please help if u can. Thanks in advance ---if i remove require "sys/socket.ph"; line it gives error as Undefined subroutine &main::TCP_NODELAY called at /home/laxmig/Projects/NM

before -

2005-06-02 Thread Brent Clark
Hi all Im trying to get the numbers before the hyphen e.g. 75664545-bookings Can I use index() for this ? If anyone has any tips or advice, it would be greatfully be appreciated. Kind Regards Brent Clark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Ebay Sell Module

2005-06-02 Thread Gavin Henry
> Dear List, > > I know there is a EBay Search module on CPAN, but do you think there would > be any interest in a EBay Sell module. > > Something that gives us a way to resize your photos, put them on EBay or a > site of your choice and can fill out the sell form using WWW::Mechanize > > Thoughts

Ebay Sell Module

2005-06-02 Thread Gavin Henry
Dear List, I know there is a EBay Search module on CPAN, but do you think there would be any interest in a EBay Sell module. Something that gives us a way to resize your photos, put them on EBay or a site of your choice and can fill out the sell form using WWW::Mechanize Thoughts? Thanks. --