in reply to Do I need/want to close __DATA__?

warn should include both the details, the position in the script/module, and the position in the input:
#! /usr/bin/perl use warnings; use strict; print "" while <DATA>; warn 'here'; __DATA__ 1 2 3

Stderr:

here at /home/choroba/1.pl line 6, <DATA> line 3. # in the script: ~~~~~~~~~~~ # in the input: ~~~~~~~~~~~~~

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Do I need/want to close __DATA__?
by BillKSmith (Monsignor) on Apr 13, 2020 at 14:11 UTC
    I agree that messages intended for the developer should include both. However, messages intended for the end-user normally should not contain either. This is the choice that we do have.
    Bill