in reply to Using fcntl function for the first time
or capture your packed data into a variable:use strict; use warnings; use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); my $file_name='/tmp/test_me.txt'; open my $fh,'>',$file_name || die "can't open $file_name for writing: +$!\n"; my $flags=fcntl $fh,F_GETFL,O_NONBLOCK || die "fcntl call failed: $!\n +"; print "Flags: $flags\n"; close $fh || die "can't close write handle to $file_name: $!\n";
my $flags=fcntl(FH,F_GETFL,$_) || die "fcntl call failed: $!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using fcntl function for the first time
by runrig (Abbot) on Mar 11, 2015 at 22:36 UTC |