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/perl
> >
> > my $root = "/home/";
> > my $file = "home.txt";
> > open(FH,$file) or die "Can't open $file: $!\n";
> >
> > while (<FH>) {
> > chomp;
>
> s/\s*$//; # delete all whitespace at the end of the string
>
> > my $n = "$root"."$f";
> > print "Making \"$n\"\n";
>
> # use qq operator to avoid ugly escaped quotes
> print qq(Making "$n"\n);
>
>
> HTH,
> Thomas
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>