The value is not initialized.  As the error states, $fct has not been
initialized (assigned a value).  Initialize $fct by assigning a value to it.


        my $fct = 0;
or
        my($fct);
        $fct = 0;
etc...

Bear in mind that this is only a warning, not a critical error.  This error
does not prevent the program from working.  


Jeremy Elston
Sr. Staff Unix System Administrator
Electronic Brokerage Technology
Charles Schwab & Co., Inc.
(602.431.2087 [EMAIL PROTECTED])

WARNING:  All email sent to this address will be received by the Charles
Schwab Corporate email system and is subject to archival and review by
someone other than the recipient


-----Original Message-----
From: Nikola Knezevic [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 12:25 PM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] fcntl()


Why doesn't the program bellow work:
Perl complains about some uninitialised value at line 13, but there
everything seems to be OK...

#!/bin/perl -w
use Fcntl;
use English;

my($fname) = $ARGV[0];

open(FIN, "<$fname") or die "Cannot open $fname\n";
$RS = undef;
my($strng) = <FIN>;

my($fct);

fcntl(FIN, F_GETFL, $fct) or die ("AAAA $!\n");
#I...... line with problems

print $fct;

close(FIN);

__END__

-- 
  +- -- - --- ----[ http://users.hemo.net/indy ]---- -- -
       Knezevic Nikola :: [EMAIL PROTECTED]
                               hemo.net
         - --- -- ----- ----==----===---------===-----------+



_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to