It is important to note that once the DATA handle is read, it cannot (easily) be re-read (seeking to the beginging of the file puts you at the top of your source, not the top of the DATA handle).
Erm, no it's very easy to do this.
#!/usr/bin/perl use Fcntl qw( :seek ); my $top_o_data = tell( DATA ); for( 1 .. 2 ) { print "read $_\n---\n"; seek( DATA, $top_o_data, SEEK_SET ); print while <DATA>; } __DATA__ Wubba. Zoikes. Jinkies.
Update: The problem of course is that you may not see updates (at least not on OS X or Linux that I've checked).
In reply to Re: Re: DATA versus config file
by Fletch
in thread DATA versus config file
by nimdokk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |