[sf-perl] Slinging two handles into __DATA__

Chris Weyl cweyl at alumni.drew.edu
Fri Oct 3 15:56:03 PDT 2008


On Fri, Oct 3, 2008 at 3:49 PM, Randal L. Schwartz
<merlyn at stonehenge.com> wrote:
>>>>>> "yary" == yary  <not.com at gmail.com> writes:
>
> yary> I just solved my issue, but since I had this email half typed up &
> yary> still have questions, thought I'd share.
>
> yary> My goal was to have two chunks to compare in a __DATA__ section and a
> yary> file handle pointing to each. I want to read from DATA and OLD_DATA as
> yary> if they are separate files, interleaving reads from them, doing
> yary> calculations on a lines from each, then continuing.
>
>    use Inline::Files; # from the CPAN

Data::Section works similarly, but minus the source filters and with
scalar references rather than filehandles.

                                          -Chris
-- 
Chris Weyl
Ex astris, scientia


More information about the SanFrancisco-pm mailing list