in reply to How can read form __DATA__ via filehandler

Pass \*DATA, as shown below:
#!/usr/bin/perl use strict; use warnings; package Bar; sub read_it { my $fh = shift; print while <$fh>; } package Foo; Bar::read_it \*DATA; __DATA__ one two three four

Abigail