Re: File search.

2006-04-26 Thread John W. Krahn
hridyesh pant wrote: > Hi, Hello, > I want to search a particular file inside the the first level of > directories. > like i have the directories like /usr/local/bin, /usr/package/bin , > /usr/lib/samba etc > i want to search a file only inside the first level of directories like > /usr/loca

Re: Chomp method

2006-04-26 Thread John W. Krahn
AndrewMcHorney wrote: > Hello Hello, > I am wondering how the chomp function works. I am looking to see how I > can truncate new line and/or carriage returns from a string. Will chomp > do nothing if there are no carriage return or line feed at the end. If > the end of the string has a space will

Re: Chomp method

2006-04-26 Thread Jaime Murillo
On Wednesday 26 April 2006 22:51, AndrewMcHorney wrote: > Hello Hey Andrew > > I am wondering how the chomp function works. I am looking to see how > I can truncate new line and/or carriage returns from a string. Will > chomp do nothing if there are no carriage return or line feed at the > end. If

Re: Chomp method

2006-04-26 Thread nishanth ev
Hello, The chomp function will chomp off the last character if its a new line. Spaces wont be truncated by chomp. Regards Nishanth > Hello > > I am wondering how the chomp function works. I am > looking to see how > I can truncate new line and/or carriage returns from > a string. Will > chom

Chomp method

2006-04-26 Thread AndrewMcHorney
Hello I am wondering how the chomp function works. I am looking to see how I can truncate new line and/or carriage returns from a string. Will chomp do nothing if there are no carriage return or line feed at the end. If the end of the string has a space will it leave it alone? Andrew -- T

File search.

2006-04-26 Thread hridyesh pant
Hi, I want to search a particular file inside the the first level of directories. like i have the directories like /usr/local/bin, /usr/package/bin , /usr/lib/samba etc i want to search a file only inside the first level of directories like /usr/local,/usr/package,/usr/lib etc.. I check wi

Re: Mismatch Positions of Two Ambiguous Strings

2006-04-26 Thread D. Bolliger
Hi Edward forget my posting - it contains in no way a different approach; I read your sub as only using the '[...]' parts of source and target. Dani -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Mismatch Positions of Two Ambiguous Strings

2006-04-26 Thread John Ackley
Wijaya Edward wrote: Hi, I have two strings that I want to compute the number of mismatches between them. These two strings are of the "same" size. Let's call them 'source' string and 'target' string. Now, the problem is that the 'source' and 'target' string may come in ambiguous form, meaning th

Re: Mismatch Positions of Two Ambiguous Strings

2006-04-26 Thread D. Bolliger
Wijaya Edward am Donnerstag, 27. April 2006 02.51: > Hi, > I have two strings that I want to compute the number of mismatches between > them. These two strings are of the "same" size. Let's call them 'source' > string and 'target' string. Now, the problem is that the 'source' and > 'target' string

RE: Portal Authentication

2006-04-26 Thread Russ Foster
This could have nothing to do with Perl, or it could have everything to do with Perl. Certainly not every website uses NT authentication for controlling web site access. Chico - could you be more specific? It's easy to say to put an ID and password in a database and compare everything before per

Re: Portal Authentication

2006-04-26 Thread nishanth ev
Hello, This has nothing to do with the Perl. You can achieve this through the IIS. Click on domain and then properties in IIS. click on Directory security and there you are. This is the best method rather than through perl. Regards Nishanth --- Chico <[EMAIL PROTECTED]> wrote: > Have a windows

[OT] list-reply (was: Re: problem with whitespace not splitting on split.)

2006-04-26 Thread Dr.Ruud
Chad Perrin schreef: > Dr.Ruud: >> Chad Perrin: >>> Is there a particular reason this list uses list-reply, with reply >>> defaulting only to the individual? >> >> I use a usenet-interface, and that doesn't have this 'problem'. >> news://nntp.perl.org/perl.beginners > > I don't (and don't really

Mismatch Positions of Two Ambiguous Strings

2006-04-26 Thread Wijaya Edward
Hi, I have two strings that I want to compute the number of mismatches between them. These two strings are of the "same" size. Let's call them 'source' string and 'target' string. Now, the problem is that the 'source' and 'target' string may come in ambiguous form, meaning that in one position

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Chad Perrin
On Thu, Apr 27, 2006 at 01:35:07AM +0200, Dr.Ruud wrote: > Chad Perrin schreef: > > > Is there a particular reason this list uses list-reply, with reply > > defaulting only to the individual? > > I use a usenet-interface, and that doesn't have this 'problem'. > news://nntp.perl.org/perl.beginne

Re: match file name at end of a http url

2006-04-26 Thread Chad Perrin
On Thu, Apr 27, 2006 at 01:26:39AM +0200, Dr.Ruud wrote: > Chad Perrin schreef: > > Jay Savage: > > >> First, take Tom's advice: use a module. The docs for URI::URI are > >> pretty clear. If you need haelp figuring it out, post a question > >> here, and people will be happy to help. > > > > I woul

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Dr.Ruud
Chad Perrin schreef: > Is there a particular reason this list uses list-reply, with reply > defaulting only to the individual? I use a usenet-interface, and that doesn't have this 'problem'. news://nntp.perl.org/perl.beginners -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-

Re: match file name at end of a http url

2006-04-26 Thread Dr.Ruud
Chad Perrin schreef: > Jay Savage: >> First, take Tom's advice: use a module. The docs for URI::URI are >> pretty clear. If you need haelp figuring it out, post a question >> here, and people will be happy to help. > > I would have recommended scrapping the idea of a regex and just using > split()

Re: match file name at end of a http url

2006-04-26 Thread Chad Perrin
On Wed, Apr 26, 2006 at 04:45:01PM -0400, Jay Savage wrote: > > First, take Tom's advice: use a module. The docs for URI::URI are > pretty clear. If you need haelp figuring it out, post a question here, > and people will be happy to help. I would have recommended scrapping the idea of a regex and

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Chad Perrin
On Wed, Apr 26, 2006 at 03:22:16PM -0500, Rance Hall wrote: > I'm working on a new perl script thats giving me fits. [snip] I just sent a lengthy reply to this that was supposed to go to the list, but accidentally sent it to the individual. I don't care to try to reconstruct it. It probably doe

RE: problem with whitespace not splitting on split.

2006-04-26 Thread Timothy Johnson
>The confusion comes from the poor wording of the perldoc. > > "As a special case, specifying a PATTERN of space (' ') will >split on white space just as "split" with no arguments does. >Thus, "split(' ')" can be used to emulate awk's default >behavior, whereas "split(/ /)" will give

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Dr.Ruud
Mr. Shawn H. Corey schreef: > Rance Hall: >> @domain = split(' ',$domainlist); > > @domain = split /\s+/, $domainlist; > > It's not splitting on whitespace since you are telling it to split on > a single space character (ASCII 0x20). perldoc -f split: "As a special case, specifying a PATTERN o

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Dr.Ruud
"Adriano Ferreira" schreef: > Rance Hall: >> @domain = split(' ',$domainlist); > > This usage of split only splits at spaces. perldoc -f split: "As a special case, specifying a PATTERN of space (' ') will split on white space just as "split" with no arguments does." -- Affijn, Ruud "Gewoon is

RE: problem with whitespace not splitting on split.

2006-04-26 Thread Timothy Johnson
>-Original Message- >From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] >Sent: Wednesday, April 26, 2006 1:32 PM >To: Rance Hall >Cc: beginners@perl.org >Subject: Re: problem with whitespace not splitting on split. > >On Wed, 2006-26-04 at 15:22 -0500, Rance Hall wrote: >> I'm working on

RE: problem with whitespace not splitting on split.

2006-04-26 Thread Charles K. Clarkson
Mr. Shawn H. Corey wrote: : On Wed, 2006-26-04 at 15:22 -0500, Rance Hall wrote: : : @domain = split /\s+/, $domainlist; : : It's not splitting on whitespace since you are telling it to : split on a single space character (ASCII 0x20). I thought a single space character was whitespace.

Re: match file name at end of a http url

2006-04-26 Thread Jay Savage
On 4/25/06, Ken Perl <[EMAIL PROTECTED]> wrote: > If I want to use regular expression to extract the charactors after > the last '/' in the url, but below regexpr doesn't work, what I do > wrong? > > $url = 'http://website.com/path/file_name.img'; > if (/\/.*$/) [snip] First, take Tom's advice: u

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Tom Phoenix
On 4/26/06, Rance Hall <[EMAIL PROTECTED]> wrote: > @domain = split(' ',$domainlist); > $domainlist = "test.domain.com\n\ntest2.domain.com\n\n" > @domain becomes "test.domain.comtest2.domain.com" with > just one element. Could there be some other character in $domainlist? When I use "\n" as you

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Mr. Shawn H. Corey
On Wed, 2006-26-04 at 15:22 -0500, Rance Hall wrote: > I'm working on a new perl script thats giving me fits. > > Ive never quite seen anything like this. > > here is the command that is not giving me the results I want. > > @domain = split(' ',$domainlist); > > what should have happened was th

RE: problem with whitespace not splitting on split.

2006-04-26 Thread Timothy Johnson
What happens if you are more specific? @domain = split(/\w/,$domainlist); -Original Message- From: Rance Hall [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 1:22 PM To: beginners@perl.org Subject: problem with whitespace not splitting on split. I'm working on a new perl s

Re: match file name at end of a http url

2006-04-26 Thread Mr. Shawn H. Corey
On Wed, 2006-26-04 at 12:34 -0700, Tom Phoenix wrote: >http://www.example.com/index.html?path=home/fake.jpg No need to fake it: http://www.example.com/index.cgi/path_info/more_path/some_file.html See `perldoc CGI` and search for 'path_info()' -- __END__ Just my 0.0002 million dollars

Re: problem with whitespace not splitting on split.

2006-04-26 Thread Adriano Ferreira
On 4/26/06, Rance Hall <[EMAIL PROTECTED]> wrote: > @domain = split(' ',$domainlist); This usage of split only splits at spaces. For example, if $domaintlist contains 'a b c', you will get ('a', 'b', 'c'). It has nothing to do with other kinds of spaces. If you meant @domain = split /\s+/, $doma

problem with whitespace not splitting on split.

2006-04-26 Thread Rance Hall
I'm working on a new perl script thats giving me fits. Ive never quite seen anything like this. here is the command that is not giving me the results I want. @domain = split(' ',$domainlist); what should have happened was that if there was any whitespace in the file (including new lines, and

Re: match file name at end of a http url

2006-04-26 Thread Tom Phoenix
On 4/25/06, Kelvin Wu <[EMAIL PROTECTED]> wrote: > if ($url =~ /\/([^\/]*)$/) { http://www.example.com/index.html?path=home/fake.jpg > > > > To process a URL requires more than a simple pattern > > > > match. Use a > > > > module from CPAN. Cheers! > > > > What I said. What I keep saying.

Re: perl class design for logging updates on multiple tables

2006-04-26 Thread Mr. Shawn H. Corey
On Wed, 2006-26-04 at 19:44 +0100, Graeme McLaren wrote: > Hi all, I have a problem where I have say, five tables one of which is > called "log" this keeps a log of various updates that are done to the other > four tables. By tables, do you means SQL tables in a SQL database? Many modern SQL dat

perl class design for logging updates on multiple tables

2006-04-26 Thread Graeme McLaren
Hi all, I have a problem where I have say, five tables one of which is called "log" this keeps a log of various updates that are done to the other four tables. I have been working on one particular script and I have a function called "add_to_log" which adds various information about the update

Portal Authentication

2006-04-26 Thread Chico
Have a windows environement (IIS, MSSQL, PERL) and want users to authenticate before being able to enter the web site... What is the best way to do this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Citing perl

2006-04-26 Thread Kevin Viel
Tom Phoenix wrote: On 4/26/06, Kevin Viel <[EMAIL PROTECTED]> wrote: Is there a standard citation of perl, for instance a paper in a journal describing the language, that I might use for a publication? Well, just to be certain, are you talking about Perl the programming language? Or perl, t

Re: Citing perl

2006-04-26 Thread Tom Phoenix
On 4/26/06, Kevin Viel <[EMAIL PROTECTED]> wrote: > Is there a standard citation of perl, for instance a paper in a > journal describing the language, that I might use for a > publication? Well, just to be certain, are you talking about Perl the programming language? Or perl, the executable progr

Citing perl

2006-04-26 Thread Kevin Viel
Is there a standard citation of perl, for instance a paper in a journal describing the language, that I might use for a publication? Thanks, Kevin -- Kevin Viel Department of Genetics e-mail: [EMAIL PROTECTED]

Re: rm -rf in perl

2006-04-26 Thread JupiterHost.Net
Mr. Shawn H. Corey wrote: On Tue, 2006-25-04 at 16:41 -0500, JupiterHost.Net wrote: althought technically any rm -rf (ven the shell itself) has a race condition since it could clean out directory, move on and then, someone adds a file between cleaning out the directory and its removal. S

Re: sort {} to work with undef values when its expecting an object

2006-04-26 Thread JupiterHost.Net
Tom Phoenix wrote: On 4/25/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: sort { $a->value() cmp $b->value() || $a->part('Name')->value() cmp $b->part('Name')->value() } grep { defined } @objects But sometimes $a->part('Name') returns undef, so the sort

Re: rm -rf in perl

2006-04-26 Thread Jay Savage
On 4/25/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Tue, 2006-25-04 at 16:41 -0500, JupiterHost.Net wrote: > > althought technically any rm -rf (ven the shell itself) has a race > > condition since it could clean out directory, move on and then, someone > > adds a file between cleaning o

Re: Regular expressions

2006-04-26 Thread Косов Евгений
Sombody help me if i give ([a-z]+)(.*)([a-z]+) as input string output i get is $1 is 'silly' $2 is 'silly' $3 is 'silly' this is wrong according to be book i refer please somone clarify me code i used is as below This is correct. first word that matches ([a-z]+) is 'silly'. print "\$1 is

Regular expressions

2006-04-26 Thread badrinath chitrala
HI Sombody help me if i give ([a-z]+)(.*)([a-z]+) as input string output i get is $1 is 'silly' $2 is 'silly' $3 is 'silly' this is wrong according to be book i refer please somone clarify me code i used is as below use strict; use warnings; $_ = '1: A silly sentence (495,a) *BUT* one which w

Re: match file name at end of a http url

2006-04-26 Thread Dr.Ruud
"Ken Perl" schreef: > $url = 'http://website.com/path/file_name.img'; What if your URI is http://www.example.com/path/index.html;1;5?two=2#end There are special domain names that should be used in and as examples: http://en.wikipedia.org/wiki/.example http://www.ietf.org/rfc/rfc2606.txt $

Re: Help in checking the OS type...

2006-04-26 Thread Mazhar
Dear Balan Yes Man Checking the OS type i.e. whether linux or windows. and then checking the drives or volumes present and calculate the disk space. regards Mazhar On 4/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Did you mean kind of operating system like windows,linux,etc? > > -O