Closed JEDtoo closed 10 months ago
For WHENCE you may use the constants
SEEK_SET
,SEEK_CUR
, andSEEK_END
(start of the file, current position, end of the file) from the Fcntl module.
So those constants have to be imported from the Fcntl module, e.g. like this: use Fcntl ':seek'
.
no strict
allows the code to compile because it causes the non-existent constant to be treated as a bareword. This is obviously not the right solution.
Also, Stack Overflow, Perl Monks and the #perl IRC channel on libera.chat are better places for basic Perl questions.
Description Can't use SEEK_END because it "isn't numeric" Ubuntu 22.04.3 LTS
In addition, "contributing" and "guidelines" linked here seem to be empty.
Steps to Reproduce
Just try this short program.
Expected behavior It should not issue error message and should work with SEEK_END, as all the documentation says. It took a LONG time to find that 2 means the same
thing.
Perl configuration