format and print to array

Discussion in 'Perl Misc' started by justme, Feb 22, 2005.

  1. justme

    justme Guest

    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
     
    justme, Feb 22, 2005
    #1
    1. Advertising

  2. justme

    Eric Bohlman Guest

    (justme) wrote in news:c0837966.0502211748.4c210f59
    @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.
     
    Eric Bohlman, Feb 22, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    729
    Magnus Lycka
    Oct 27, 2006
  2. keto
    Replies:
    0
    Views:
    1,000
  3. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    374
    David Cournapeau
    Dec 30, 2008
  4. Bart Braem

    The default array print format

    Bart Braem, Sep 20, 2006, in forum: Ruby
    Replies:
    4
    Views:
    146
    Carlos
    Sep 22, 2006
  5. Replies:
    3
    Views:
    136
    Dave Weaver
    Sep 8, 2005
Loading...

Share This Page