in reply to Re: CGI script bringing its own data
in thread CGI script bringing its own data
I'd like to doopen (my $in_fh, $infile) or die; local $/; # enable slurping mode my $data = <$in_fh>; close $in_fh;
Any ideas on how to do it? I think I've seen similar constructs in C (though I don't know any C), and I'd be surprised if there wasn't a "canonical" way to do it in Perl. -hacmacmy $data = handoverthedata(); (...) sub handoverthedata{ # Inlined data starts here # and gets stored in my $foo... # Data # Data # Data # Data # Data # Data # Data # Data # Data # Data # Data # Data # Data return $foo; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: CGI script bringing its own data
by liz (Monsignor) on Sep 03, 2003 at 10:56 UTC |