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 > getting a odd end of line char

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"