Re: Re[8]: Stripping line breaks

2001-08-25 Thread Christopher Solomon
On Sun, 26 Aug 2001, Maxim Berlin wrote: > Hello Christopher, > > Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: > > CS> or am I misunderstanding you? > > may be. > example: > > $regex=; chomp $regex; > $variable=; chomp $variable; > $a =~ s!$variable!$regex!; > We

Re[8]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Christopher, Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: >> >> >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? >> >> >> >> CS> You can. >> >> >> >> CS> $a =~ s!$/!!g; >> >> >> >> CS> Perl just gets confused with the /'s, you have to use alte

Re: Re[6]: Stripping line breaks

2001-08-25 Thread Christopher Solomon
On Sun, 26 Aug 2001, Maxim Berlin wrote: > Hello Christopher, > > Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: > > >> >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? > >> > >> CS> You can. > >> > >> CS> $a =~ s!$/!!g; > >> > >> CS> Perl just gets

Re[6]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Christopher, Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: >> >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? >> >> CS> You can. >> >> CS> $a =~ s!$/!!g; >> >> CS> Perl just gets confused with the /'s, you have to use alternate >> CS> delimite

RE: alternative to regex when checking for captitalization

2001-08-25 Thread Gibbs Tanton - tgibbs
Along the same lines, if you just want to know if it is capitalized, you can say $all_caps = $str eq uc $str; Good Luck! Tanton -Original Message- From: Christopher Solomon To: Charles Lu Cc: [EMAIL PROTECTED] Sent: 8/25/2001 7:05 PM Subject: Re: alternative to regex when checking for c

Re: alternative to regex when checking for captitalization

2001-08-25 Thread Christopher Solomon
On Sat, 25 Aug 2001, Charles Lu wrote: > Does anyone know if there is a built in function that allows you to check to > see if all the characters in a string is capitalized or not? In other words > is there a way to check to see if a string is capitalized without using > regular expression?

Re: Re[4]: Stripping line breaks

2001-08-25 Thread Christopher Solomon
On Sun, 26 Aug 2001, Maxim Berlin wrote: > Hello Christopher, > > Saturday, August 25, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: > >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? > > CS> You can. > > CS> $a =~ s!$/!!g; > > CS> Perl just gets confused with the /'s,

alternative to regex when checking for captitalization

2001-08-25 Thread Charles Lu
Does anyone know if there is a built in function that allows you to check to see if all the characters in a string is capitalized or not? In other words is there a way to check to see if a string is capitalized without using regular expression? Thanks alot charles ___

Re[4]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Christopher, Saturday, August 25, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote: >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? CS> You can. CS> $a =~ s!$/!!g; CS> Perl just gets confused with the /'s, you have to use alternate CS> delimiters. ok, what about "$!"

Re: Re[2]: Stripping line breaks

2001-08-25 Thread Christopher Solomon
On Sat, 25 Aug 2001, Maxim Berlin wrote: > Hello Rory, > p.s. does anyone know, why i can not write "$a =~ s/$///g;" ? You can. $a =~ s!$/!!g; Perl just gets confused with the /'s, you have to use alternate delimiters. Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

RE: Stripping line breaks

2001-08-25 Thread Rory O'Connor
What is the actual character applied when someone hits the return key in a TEXTAREA form field (in windows...if it matters)? That's the character I need to strip out. Thanks! On Sat, 25 Aug 2001 11:50:36 -0500, Rory O'Connor wrote: > If you always know it will be a \n, then you can do >$str =~

RE: Stripping line breaks

2001-08-25 Thread Gibbs Tanton - tgibbs
If you always know it will be a \n, then you can do $str =~ tr/\n//d; -Original Message- From: Rory O'Connor To: [EMAIL PROTECTED] Sent: 8/25/2001 10:13 AM Subject: Re: Stripping line breaks thanks all for your help. It is my understanding that chomp($var); will only strip the \n from

Re[2]: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Rory, Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote: ROC> thanks all for your help. It is my understanding that chomp($var); will ROC> only strip the \n from the end of a string. I'm dealing with strings ROC> that could potentially be littered with newline characters

Re: Stripping line breaks

2001-08-25 Thread Rory O'Connor
thanks all for your help. It is my understanding that chomp($var); will only strip the \n from the end of a string. I'm dealing with strings that could potentially be littered with newline characters. I have an o'reilly perl book, but it's not super clear on how to strip *all* newline character

Re: Getting the time

2001-08-25 Thread John Haffner
Rory wrote: >All I need to do is find out how to get the current date and time from >the server so that I can write it to a logfile I'm creating. How can I >do that? > Hi Rory, I'm a newbie, but here's something from the llama book (Learning Perl, 3rd Ed.) p. 286: "If you need the current tim

Re: Stripping line breaks

2001-08-25 Thread Maxim Berlin
Hello Rory, Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote: ROC> Another quick one - how can I easily strip line break characters from a ROC> variable? see perldoc -f chomp Best wishes, Maximmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail

Re: Getting the time

2001-08-25 Thread Maxim Berlin
Hello Rory, Saturday, August 25, 2001, Rory O'Connor <[EMAIL PROTECTED]> wrote: ROC> All I need to do is find out how to get the current date and time from ROC> the server so that I can write it to a logfile I'm creating. How can I ROC> do that? which server do you mean? NTP? or you need local

Stripping line breaks

2001-08-25 Thread Rory O'Connor
Another quick one - how can I easily strip line break characters from a variable? Thanks! providing the finest in midget technology -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Getting the time

2001-08-25 Thread Rory O'Connor
All I need to do is find out how to get the current date and time from the server so that I can write it to a logfile I'm creating. How can I do that? Thanks! Rory providing the finest in midget technology -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: comparing hash values

2001-08-25 Thread Marcus Holland-Moritz
You can check if a key is already in a hash table with Perl's exists() function. Have a look at 'perldoc -f exists' for details. Hope this helps. -- Marcus - Original Message - From: "Darfler, Jim (J.E.)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 8:05 PM

Re: Multiple Versions of Perl on One System

2001-08-25 Thread Paul Johnson
On Sat, Aug 25, 2001 at 08:10:49AM -0400, Kevin der Kinderen wrote: > I hope my question is relevant to the list. > > I run Redhat 7.1. > > I'd like to download the latest source for Perl and install it without > interferring with the version that's installed with Redhat. The > installed version

generation of individual ANSI characters in RTF via perl?

2001-08-25 Thread Birgit Kellner
I want to generate RTF-documents where special characters that look like "a@" are translated into ANSI values depending on which font the user would like to have. I am using the module RTF::Writer to generate RTF-files from perl. The conversion as such is done via a hash of hashes (thanks Marc

Multiple Versions of Perl on One System

2001-08-25 Thread Kevin der Kinderen
I hope my question is relevant to the list. I run Redhat 7.1. I'd like to download the latest source for Perl and install it without interferring with the version that's installed with Redhat. The installed version can't be uninstalled (by me) because there's so many dependencies on it. The rea