in reply to Re: __DATA__, seek, and tell
in thread __DATA__, seek, and tell
This, by the way, is going into a Perl module.#!/usr/bin/perl use strict; use warnings; while (<>) { my $datapos = tell DATA; while (<DATA>) { print; } seek DATA, $datapos, 0; } __DATA__ foo bar baz Your data here! Add, remove, or change lines while running the program. Every time you hit Return, you will see the current contents of DATA.
|
|---|