format and print to array

J

justme

hi

i am studying how to format a report using "format" and was wondering,
can we format it to a variable or an array instead?

say to format to a file, we can specify a filehandle.

open(FILE, ">> $file) or die ......
format FILE=
@<<<< blah blah
..
write FILE

but what if i want to print to an array instead of a file?
thanks
 
E

Eric Bohlman

(e-mail address removed) (justme) wrote in @posting.google.com:
i am studying how to format a report using "format" and was wondering,
can we format it to a variable or an array instead?

say to format to a file, we can specify a filehandle.

open(FILE, ">> $file) or die ......
format FILE=
@<<<< blah blah
.
write FILE

but what if i want to print to an array instead of a file?

perldoc perlform, specifically the "Accessing Formatting Internals" part.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top