Thomas B�tzler <mailto:[EMAIL PROTECTED]> 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 valuable information about where perl died.
open(FH,$file) or die "Can't open $file: $!";
: :
: : while (<FH>) {
: : chomp;
:
: s/\s*$//; # delete all whitespace at the end of the string
:
: : my $n = "$root"."$f";
Also, don't quote variables unnecessarily.
my $n = "$root$f";
Or:
my $n = $root . $f;
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>