in reply to file contents as a part of code?
The simple, but presumably wrong, answer is that the file contents can just be slurped into a string and the string passed to the subroutine. Why is that the wrong answer?
open infile, "< datafile"; my $str = join "", <infile>; close infile; gnuplot (..., $str);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: file contents as a part of code?
by davidrw (Prior) on Aug 17, 2005 at 02:04 UTC | |
by halley (Prior) on Aug 17, 2005 at 13:55 UTC | |
by djwaddel (Initiate) on Aug 17, 2005 at 16:03 UTC |