On Thu, 2008-08-14 at 15:02 +0100, Jishnupraveen gira wrote:
>
> the error code is
>
> "Couldnt open C:/Program Files/Perl Express/Debug/pdef.txt - No such
> file or directory"
>
> But my script is in the path:
> C:\perl123
>
> and the file pdef.txt is in the same path..
Try adding the following:
use strict;
use warnings;
use File::Basename;
my $Self_Dir = dirname( $0 );
my $fil="$Self_Dir/pdef.txt";
open(DEFILE,"<$fil")|| die "Couldnt open pdef file - $!\n";
--
Just my 0.00000002 million dollars worth,
Shawn
"Where there's duct tape, there's hope."
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/