Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Question on characterposition on a line

Reply
Thread Tools

Question on characterposition on a line

 
 
Huub
Guest
Posts: n/a
 
      07-06-2006
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
 
Reply With Quote
 
 
 
 
anno4000@radom.zrz.tu-berlin.de
Guest
Posts: n/a
 
      07-06-2006
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
 
Reply With Quote
 
 
 
 
khadhar@gmail.com
Guest
Posts: n/a
 
      07-06-2006

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.

 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      07-06-2006
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
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Huub
Guest
Posts: n/a
 
      07-06-2006
>
> 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.
 
Reply With Quote
 
axel@white-eagle.invalid.uk
Guest
Posts: n/a
 
      07-07-2006
http://www.velocityreviews.com/forums/(E-Mail Removed)-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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read a file line by line and write each line to a file based on the5th byte scad C++ 23 05-17-2009 06:11 PM
How to read a text file line by line and remove some line kaushikshome C++ 4 09-10-2006 10:12 PM
Beginner: read $array with line breaks line by line Marek Stepanek Perl Misc 12 09-02-2006 10:27 AM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM
Use of uninitialized value in concatenation (.) at register.pl line 38, <STDIN> line 10. G Kannan Perl 1 10-11-2003 11:58 AM



Advertisments