poj has shown you how to open a normal file. The previous code that used DATA is using the special filehandle DATA, which reads from beyond the __DATA__ marker, as if it were a separate, already-opened file. For more on the __DATA__ special literal, and the automatic DATA filehandle, see https://perldoc.perl.org/perldata.html#Special-Literals
edit: clarify
In reply to Re^3: Extract length sum from columns and print pattern into another file
by pryrt
in thread Extract length sum from columns and print pattern into another file
by rebkirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |