Re: Coverting string with commas to a number to add

2008-10-11 Thread John W. Krahn
AndrewMcHorney wrote: Hello Hello, I have a line of code that appears to not be returning what I am looking for. I am attemting to add a number which has commas in it. It represents the number of bytes of a file obtained for the dir command. At the end of the run the number of bytes does no

Re: Stripping the beginning of a line of spaces

2008-10-11 Thread John W. Krahn
AndrewMcHorney wrote: Hello Hello, I am working on a script that does a directory of a Windows drive. There are some lines returned where there are spaces before the 1st character. If it's the first character then by definition it can't have anything before it. This throws off the spli

Coverting string with commas to a number to add

2008-10-11 Thread AndrewMcHorney
Hello I have a line of code that appears to not be returning what I am looking for. I am attemting to add a number which has commas in it. It represents the number of bytes of a file obtained for the dir command. At the end of the run the number of bytes does not come close to what I expect.

Re: Stripping the beginning of a line of spaces

2008-10-11 Thread AndrewMcHorney
Hello Now the question how does this put this into a line of code? Say I have $String1 and $String2 where I want to do $String1 = $String2 with the conversion. What would the code look like? Andrew At 05:23 PM 10/11/2008, Mr. Shawn H. Corey wrote: On Sat, 2008-10-11 at 16:58 -0700, AndrewMc

Re: Stripping the beginning of a line of spaces

2008-10-11 Thread Mr. Shawn H. Corey
On Sat, 2008-10-11 at 16:58 -0700, AndrewMcHorney wrote: > Hello > > I am working on a script that does a directory of a Windows drive. > There are some lines returned where there are spaces before the 1st > character. This throws off the splitting of the line into an array. > How can I strip t

Stripping the beginning of a line of spaces

2008-10-11 Thread AndrewMcHorney
Hello I am working on a script that does a directory of a Windows drive. There are some lines returned where there are spaces before the 1st character. This throws off the splitting of the line into an array. How can I strip the leading characters in an efficient way into either the same stri

Re: Percentile of inserted element

2008-10-11 Thread Rob Dixon
Kelly Jones wrote: > I want an efficient subroutine that inserts $elt into @x and returns > the percentile of $elt in @x. > > For example, if @x is (2,2,3,3,3,4,5,6,7,8) and $elt is 3, the > subroutine returns .363636... and @x is now > (2,2,3,3,3,3,4,5,6,7,8). Why .363636...?: > > % After inser

Percentile of inserted element

2008-10-11 Thread Kelly Jones
I want an efficient subroutine that inserts $elt into @x and returns the percentile of $elt in @x. For example, if @x is (2,2,3,3,3,4,5,6,7,8) and $elt is 3, the subroutine returns .363636... and @x is now (2,2,3,3,3,3,4,5,6,7,8). Why .363636...?: % After insertion, @x has 11 elements. $elt (3)

Re: print /! get a newline

2008-10-11 Thread Dr.Ruud
Jeff Pang schreef: > Ruud: >> X-post alert: clpm. > > what does this mean? http://groups.google.co.uk/groups?as_q=wholething&as_ugroup=comp.lang.perl.misc&as_uauthors=april -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: print /! get a newline

2008-10-11 Thread Jeff Pang
> Message du 11/10/08 14:57 > De : "Dr.Ruud" > A : beginners@perl.org > Copie à : > Objet : Re: print /! get a newline > > > X-post alert: clpm. > what does this mean? Regards, Jeff. Créez votre adresse électronique [EMAIL PROTECTED] 1 Go d'espace de stockage, anti-spam et anti-virus intég

Re: print /! get a newline

2008-10-11 Thread Dr.Ruud
X-post alert: clpm. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: add module path

2008-10-11 Thread Jeff Pang
> Message du 10/10/08 17:59 > De : "Sharan Basappa" > A : "Jeff Pang" > Copie à : "Perl Beginners" > Objet : Re: add module path > > > These are system installation. Can you tell me upto what directory > should I be including use lib path? > > Under this case you don't need to specify a special p

Re:print /! get a newline

2008-10-11 Thread Jeff Pang
> Message du 11/10/08 13:39 > De : "April" > A : beginners@perl.org > Copie à : > Objet : print /! get a newline > > > print $wholething, "\!", "\n"; > > and get the following: > > Thank you > ! > > How can make them on the same line? mhh, you should chomp $wholething; before the 'print'. Re

Re: how to make file comparision quicklier?

2008-10-11 Thread tshtatland
Why do you need a tie? Take a look at the modules: Text::Diff Algorithm::Diff or the UNIX 'diff' or 'comm' utilities for a simpler solution. HTH, Timur Shtatland On Oct 8, 3:54 am, [EMAIL PROTECTED] (Loody) wrote: > Dear all: > I try to compare 2 files line by line. > I use tie::file to save 2 f

print /! get a newline

2008-10-11 Thread April
print $wholething, "\!", "\n"; and get the following: Thank you ! How can make them on the same line? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/