newline issue

2005-06-02 Thread Lasher, Brian
Brian Lasher Best Practices and Yield Enhancement Team Catalog DSP Product Engineering Texas Instruments I thought I saw emails on this in the past, but I couldn't find them in my saved mailbox going back to nov 04. I wrote a CGI utility running on a unix server that allows users to edit

RE: newline issue

2005-06-02 Thread Lasher, Brian
Never mind. Found it on another perl email list. s/[\n\r]+$/; Brian Lasher Best Practices and Yield Enhancement Team Catalog DSP Product Engineering Texas Instruments 281-274-2913 (W) 281-684-4699 (C) 281-274-2279 (F) [EMAIL PROTECTED] -Original Message- From: Lasher, Brian Sent:

RE: require sys/socket.ph;

2005-06-02 Thread Gayatri
Hello John, 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

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. --

Re: Ebay Sell Module

2005-06-02 Thread Gavin Henry
quote who=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

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

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

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: 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

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 extract

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 PROTECTED]

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

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

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 Regards.

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

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 do so, what I

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 computer

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 http://www.stonehenge.com/merlyn/UnixReview/col44.html. -- Randal L. Schwartz - Stonehenge Consulting Services,

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

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 $self =

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;

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

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: 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

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

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

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'. But

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

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: $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 http://www.stonehenge.com/merlyn/UnixReview/col44.html.

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: 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. --

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

Backtracking question

2005-06-02 Thread N. Ganesh Babu
Dear All, lt=c24PRL IJB PRL CHA refauthfnameK./fname middlenameM./middlename surnameCuomo/surname/refauth and refauthfnameA./fname middlenameV./middlename surnameOppenheim/surname/refauth, jtitlePhys. Rev. Lett./jtitle Bvolume71/volume,/B pages65/pages (date1993/date); refauthfnameL./fname

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] http://learn.perl.org/ http://learn.perl.org/first-response

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