Writing to Filehandle

Discussion in 'Perl Misc' started by Diana, Jan 11, 2005.

  1. Diana

    Diana Guest

    Hi,
    I am writing to a file print like print <filehandle> "some stuff"
    I want to get the row and col in number where the filehandle has written,
    is it possible to get the values? , another how can I force fully move the
    position of curser so that it writes on/from row,col I want
    thanks
    D
     
    Diana, Jan 11, 2005
    #1
    1. Advertisements

  2. Diana <> wrote:

    > I want to get the row and col in number where the filehandle has written,



    There are no rows and columns in a file, just a stream of bytes.


    > is it possible to get the values? ,



    You can get the byte position of the file pointer with:

    perldoc -f tell


    > another how can I force fully move the
    > position of curser so that it writes on/from row,col I want



    You can set the position of the file pointer with:

    perldoc -f seek


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 11, 2005
    #2
    1. Advertisements

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. Eduard W. Lohmann
    Replies:
    1
    Views:
    758
  2. Bill

    key as filehandle error

    Bill, Sep 1, 2004, in forum: Perl
    Replies:
    2
    Views:
    610
  3. Christopher Reeve
    Replies:
    1
    Views:
    600
    Kevin Goodsell
    Sep 14, 2003
  4. Jorge Godoy
    Replies:
    2
    Views:
    349
    Jorge Godoy
    Oct 14, 2003
  5. Wijaya Edward
    Replies:
    1
    Views:
    291
    Marc 'BlackJack' Rintsch
    Oct 26, 2006
  6. Cliff  Martin

    Assign cout or cin to a filehandle

    Cliff Martin, Feb 8, 2007, in forum: C++
    Replies:
    5
    Views:
    516
    =?ISO-8859-15?Q?Juli=E1n?= Albo
    Feb 9, 2007
  7. dnrg
    Replies:
    5
    Views:
    261
    Matija Papec
    Jun 26, 2003
  8. Vsevolod Afanassiev

    How to put a filehandle into a hash array?

    Vsevolod Afanassiev, Jul 3, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    166
    Tad McClellan
    Jul 3, 2003
Loading...