Re: End of line character

2005-06-01 Thread John Doe
Am Dienstag, 31. Mai 2005 11.06 schrieb Dermot Paikkos: > Hi, > > perl5 (revision 5 version 8 subversion 5) on redhat fedora 3 > > I have been trying to create a list of home directories from a list. > The directory name comes straight from the list but I seem to be > gett

Re: [Summary]: End of line character

2005-06-01 Thread Jeff 'japhy' Pinyan
On Jun 1, Dermot Paikkos said: s/\s*$//; # delete all whitespace at the end of the string Except that it's awfully silly-looking. I'd *at least* do s/\s+$//; which is monumentally faster, although not perfect. -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Aca

[Summary]: End of line character

2005-06-01 Thread Dermot Paikkos
Thanx to Thomas for the quick response and answer. s/\s*$//; # delete all whitespace at the end of the string This was all that was necessary, although I like the qq tip as well. Dp. On 1 Jun 2005 at 11:27, Thomas Bätzler wrote: > Dermot Paikkos <[EMAIL PROTECTED]> coded: > [...] > > #!/bin/

RE: End of line character

2005-06-01 Thread Charles K. Clarkson
Thomas Bätzler wrote: : Dermot Paikkos <[EMAIL PROTECTED]> coded: : [...] : : #!/bin/perl : : : : my $root = "/home/"; : : my $file = "home.txt"; : : open(FH,$file) or die "Can't open $file: $!\n"; If you leave the "\n" off the end of the die(), you will see valuabl

Re: End of line character

2005-06-01 Thread John W. Krahn
Thomas Bätzler wrote: Dermot Paikkos <[EMAIL PROTECTED]> coded: [...] #!/bin/perl my $root = "/home/"; my $file = "home.txt"; open(FH,$file) or die "Can't open $file: $!\n"; while () { chomp; s/\s*$//; # delete all whitespace at the end of the string You should use \s+

RE: End of line character

2005-06-01 Thread Thomas Bätzler
Dermot Paikkos <[EMAIL PROTECTED]> coded: [...] > #!/bin/perl > > my $root = "/home/"; > my $file = "home.txt"; > open(FH,$file) or die "Can't open $file: $!\n"; > > while () { > chomp; s/\s*$//; # delete all whitespace at the end of the string > my $n = "$root"."$f"

End of line character

2005-06-01 Thread Dermot Paikkos
Hi, perl5 (revision 5 version 8 subversion 5) on redhat fedora 3 I have been trying to create a list of home directories from a list. The directory name comes straight from the list but I seem to be getting a odd end of line character from each item on the list and this gets added to the