Question on characterposition on a line

Discussion in 'Perl Misc' started by Huub, Jul 6, 2006.

  1. Huub

    Huub Guest

    Hi,

    I've been looking on CPAN for a way to determine the position of a
    character on a line, but I can't find it. My goal is to print
    address-labels with 3 labels horizontally. I haven't found a module
    providing functions like this.

    Thanks for hints and/or directions,

    Huub
     
    Huub, Jul 6, 2006
    #1
    1. Advertising

  2. Huub

    -berlin.de Guest

    Huub <"v.niekerk at hccnet.nl"> wrote in comp.lang.perl.misc:
    > Hi,
    >
    > I've been looking on CPAN for a way to determine the position of a
    > character on a line, but I can't find it.


    What does it mean to "determine the character position"? Query
    where a certain character will go? Make sure a character goes
    into a certain position? Position as in line/column? In pixels?
    Characters? Printer points? Inches? Something else entirely?

    > My goal is to print
    > address-labels with 3 labels horizontally.


    Labels with three labels? Should that be "lines"? If so, why do you
    need to determine character positions (in whatever sense) for that?

    > I haven't found a module
    > providing functions like this.


    As far as I am concerned, you have entirely failed to make clear what
    functions you are looking for.

    Anno
     
    -berlin.de, Jul 6, 2006
    #2
    1. Advertising

  3. Huub

    Guest

    Huub wrote:

    > Hi,
    >
    > I've been looking on CPAN for a way to determine the position of a
    > character on a line, but I can't find it. My goal is to print
    > address-labels with 3 labels horizontally. I haven't found a module
    > providing functions like this.
    >
    > Thanks for hints and/or directions,
    >
    > Huub


    Hi Hubb,

    Perl has three functions index(), rindex(), and substr().
    I guess you can use any of these.

    you can take the line into a variable aas a string and process.

    Hope this helps.

    Thaufeeq.
     
    , Jul 6, 2006
    #3
  4. Huub <> wrote:

    > I've been looking on CPAN for a way to determine the position of a
    > character on a line, but I can't find it.



    perldoc -f index


    > My goal is to print
    > address-labels with 3 labels horizontally.



    perldoc -f printf


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jul 6, 2006
    #4
  5. Huub

    Huub Guest

    >
    > Hi Hubb,
    >
    > Perl has three functions index(), rindex(), and substr().
    > I guess you can use any of these.
    >
    > you can take the line into a variable aas a string and process.
    >
    > Hope this helps.
    >
    > Thaufeeq.
    >


    Thank you.
     
    Huub, Jul 6, 2006
    #5
  6. Huub

    Guest

    -berlin.de wrote:
    > Huub <"v.niekerk at hccnet.nl"> wrote in comp.lang.perl.misc:
    >> Hi,

    >
    >> I've been looking on CPAN for a way to determine the position of a
    >> character on a line, but I can't find it.


    > What does it mean to "determine the character position"? Query
    > where a certain character will go? Make sure a character goes
    > into a certain position? Position as in line/column? In pixels?
    > Characters? Printer points? Inches? Something else entirely?


    >> My goal is to print
    >> address-labels with 3 labels horizontally.


    > Labels with three labels? Should that be "lines"? If so, why do you
    > need to determine character positions (in whatever sense) for that?


    I think the OP means print labels onto paper which comes with rows of
    three sticky labels.

    >> I haven't found a module
    >> providing functions like this.


    It might well be worth looking at using formats for this sort of job,
    since that also allows good vertical control. See:

    perldoc perlform

    Axel
     
    , Jul 7, 2006
    #6
    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. G Kannan
    Replies:
    1
    Views:
    1,242
    Eric J. Roode
    Oct 11, 2003
  2. Hugo
    Replies:
    10
    Views:
    1,325
    Matt Humphrey
    Oct 18, 2004
  3. kaushikshome
    Replies:
    4
    Views:
    779
    kaushikshome
    Sep 10, 2006
  4. scad
    Replies:
    23
    Views:
    1,178
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    419
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page