Re: How Much is Too Much? (WAS: formatting a list)

2013-10-02 Thread Charles DeRykus
On Wed, Oct 2, 2013 at 1:58 AM, James Griffin wrote: > * Shawn H Corey [2013-10-01 17:34:06 -0400]: > > > On Tue, 1 Oct 2013 14:14:16 -0700 > > Charles DeRykus wrote: > > > > > I'm not bucking for "net nanny" but, while full solutions and > > > follow-on discussions can be enlightening, I wonde

Re: How Much is Too Much? (WAS: formatting a list)

2013-10-02 Thread James Griffin
* Shawn H Corey [2013-10-01 17:34:06 -0400]: > On Tue, 1 Oct 2013 14:14:16 -0700 > Charles DeRykus wrote: > > > I'm not bucking for "net nanny" but, while full solutions and > > follow-on discussions can be enlightening, I wonder if they're really > > advantageous to the OP. Not to embarrass a

Re: How Much is Too Much? (WAS: formatting a list)

2013-10-01 Thread Shawn H Corey
On Tue, 1 Oct 2013 14:14:16 -0700 Charles DeRykus wrote: > I'm not bucking for "net nanny" but, while full solutions and > follow-on discussions can be enlightening, I wonder if they're really > advantageous to the OP. Not to embarrass anyone but there was no > mention of DIY attempts, no solici

Re: formatting a list

2013-10-01 Thread Charles DeRykus
On Mon, Sep 30, 2013 at 7:43 AM, Rajeev Prasad wrote: > thank you Shawn. this works nicely for me. > > > -- > *From:* Shawn H Corey > *To:* beginners@perl.org > *Cc:* Rajeev Prasad > *Sent:* Saturday, September 28, 2013 8:49 AM > *Subj

Re: formatting a list

2013-09-30 Thread Rajeev Prasad
thank you Shawn. this works nicely for me. From: Shawn H Corey To: beginners@perl.org Cc: Rajeev Prasad Sent: Saturday, September 28, 2013 8:49 AM Subject: Re: formatting a list On Fri, 27 Sep 2013 22:59:01 -0700 (PDT) Rajeev Prasad wrote: > i w

Re: formatting a list

2013-09-28 Thread Shawn H Corey
On Fri, 27 Sep 2013 22:59:01 -0700 (PDT) Rajeev Prasad wrote: > i want them to look neat, something like this: where they look in > line. I do not know before hand how long each word would be > > abc124567 > xy4z___xtr4__sdf > PQRSDR_xcvf__scc234 > > how could i use the sprintf to o

Re: formatting a list

2013-09-28 Thread Rob Dixon
On 28/09/2013 06:59, Rajeev Prasad wrote: hello, following is obtained by concatenating 3 values using an underscore to produce a list: |abc_12_4567 xy4z_xtr4_sdf PQRSDR_xcvf_scc234| i want them to look neat, something like this: where they look in line. I do not know before hand how long each

Re: formatting a list

2013-09-28 Thread Rob Dixon
On 28/09/2013 06:59, Rajeev Prasad wrote: hello, following is obtained by concatenating 3 values using an underscore to produce a list: |abc_12_4567 xy4z_xtr4_sdf PQRSDR_xcvf_scc234| i want them to look neat, something like this: where they look in line. I do not know before hand how long each

Re: formatting a list

2013-09-28 Thread Shlomi Fish
Hi Jing, On Sat, 28 Sep 2013 16:53:20 +0800 Logust Yu wrote: > Hi Rajeev, > I guess you can use printf to print them into strings, and then replace the > spaces with underscores. > The problem with using sprintf and a replace operation like that, like you suggest is that it won't handle traili

Re: formatting a list

2013-09-28 Thread Logust Yu
ofc it should be "sprintf"... 2013/9/28 Rajeev Prasad > hello, > > following is obtained by concatenating 3 values using an underscore to > produce a list: > > abc_12_4567 > xy4z_xtr4_sdf > PQRSDR_xcvf_scc234 > > i want them to look neat, something like this: where they look in line. I > do not

Re: formatting a list

2013-09-28 Thread Logust Yu
Hi Rajeev, I guess you can use printf to print them into strings, and then replace the spaces with underscores. Regards, Jing 2013/9/28 Rajeev Prasad > hello, > > following is obtained by concatenating 3 values using an underscore to > produce a list: > > abc_12_4567 > xy4z_xtr4_sdf > PQRSDR_x

Re: formatting a list

2013-09-27 Thread Shlomi Fish
Hi Rajeev, On Fri, 27 Sep 2013 22:59:01 -0700 (PDT) Rajeev Prasad wrote: > hello, > > following is obtained by concatenating 3 values using an underscore to > produce a list: > > abc_12_4567 > xy4z_xtr4_sdf > PQRSDR_xcvf_scc234 > i want them to look neat, something like this: where they look i

formatting a list

2013-09-27 Thread Rajeev Prasad
hello, following is obtained by concatenating 3 values using an underscore to produce a list: abc_12_4567 xy4z_xtr4_sdf PQRSDR_xcvf_scc234 i want them to look neat, something like this: where they look in line. I do not know before hand how long each word would be abc124567 xy4z___

Re: Formatting Numbers

2012-02-12 Thread Mike Blezien
: Mike Blezien Sent: Sunday, February 12, 2012 10:46 AM Subject: Re: Formatting Numbers On 12/02/2012 16:14, Mike Blezien wrote: > > Need a little assistance formatting numbers pulled from a databaes. Many > are like this: > > 179550, 45960, 890458 etc. > >

Re: Formatting Numbers

2012-02-12 Thread Rob Dixon
On 12/02/2012 16:14, Mike Blezien wrote: Need a little assistance formatting numbers pulled from a databaes. Many are like this: 179550, 45960, 890458 etc. what I need to do is format these values with a comma so they look like this: 179,550, 45,960, 890,458 What is the easiest way to do

Re: Formatting Numbers

2012-02-12 Thread Shlomi Fish
Hi Mike, On Sun, 12 Feb 2012 10:14:42 -0600 "Mike Blezien" wrote: > Hello, > > Need a little assistance formatting numbers pulled from a databaes. Many are > like this: > > 179550, 45960, 890458 etc. > > what I need to do is format these values w

Formatting Numbers

2012-02-12 Thread Mike Blezien
Hello, Need a little assistance formatting numbers pulled from a databaes. Many are like this: 179550, 45960, 890458 etc. what I need to do is format these values with a comma so they look like this: 179,550, 45,960, 890,458 What is the easiest way to do this? Thank you, Mike(mickalo

Re: Output formatting help

2011-08-02 Thread Linux Expert
ers > /vol/dev/dsk/c0t0d0/sol_10_1008_sparc 2599020 2599020 0 100% > /cdrom/sol_10_1008_sparc > aklns003-va2:/vol/vol_aftp/aftp/app 48179200 39619484 855971683% > /nas_mnt/aklns022/app_aftp > /dev/vx/dsk/dg_ico/prod01_db 188743680 136754136 5158342473% > /vx_mnt/db/

Re: Output formatting help

2011-08-01 Thread Paolo Gianrossi
dev/dsk/c0t0d0/sol_10_1008_sparc 2599020 2599020 0 100% > /cdrom/sol_10_1008_sparc > aklns003-va2:/vol/vol_aftp/aftp/app 48179200 39619484 855971683% > /nas_mnt/aklns022/app_aftp > /dev/vx/dsk/dg_ico/prod01_db 188743680 136754136 5158342473% > /vx_mnt/db/prod01 > /dev/v

Output formatting help

2011-08-01 Thread newbie01 perl
enshot of the desired output that am hoping to have. Tried to paste the manual formatting that I did but it comes out jagged similar to the output to a file. At the moment, only way I can think of getting the kind of formatting that am wanting to have is to do as below: - Read each line of the df outp

Re: String Formatting by Column

2011-06-28 Thread Wernher Eksteen
> > That's exactly right. I meant that, if you were using an external file, > you only needed to replace the line > > my $fh = *DATA; > > with > > open my $fh, '<', 'myfile.txt' or die $!; > > which is pretty much what you have done. Unfortunately I made a mistake > and wrote > > while () { > > in

Re: String Formatting by Column

2011-06-28 Thread Rob Dixon
On 28/06/2011 18:28, Wernher Eksteen wrote: Rob use strict; use warnings; use Fcntl 'SEEK_SET'; my $format; my $fh = *DATA; # Replace with the appropriate 'open my $fh, '<', ... or die $!; I wasn't quite sure at first what you meant by passing the file handle in the while loop when $f

Re: String Formatting by Column

2011-06-28 Thread Wernher Eksteen
Hi Rob, I wasn't quite sure at first what you meant by passing the file handle in the while loop when $fh already existed, so I changed the code slightly like this: my $file = "file.txt"; open(my $fh, "<", $file) or die $!; while (<$fh>) { Works like a charm, thanks again! Regards, Wernher

Re: String Formatting by Column

2011-06-26 Thread Wernher Eksteen
Hi Rob, Once again your expertise and willingness to help is astounding. I appreciate the idea that everyone else is trying to force me into learning a new concept I have never encountered before by giving me pointers in the direction such as telling me to look at pack and unpack or the CSV relat

Re: String Formatting by Column

2011-06-25 Thread Rob Dixon
On 24/06/2011 08:45, Wernher Eksteen wrote: > > I've attached a text file containing the original and required > format and avoid the format being lost by just pasting it in the > email body. > > The original format is separated by a space, but need to replace the > space with a comma, so it wil

Re: String Formatting by Column

2011-06-25 Thread Rob Dixon
On 24/06/2011 08:45, Wernher Eksteen wrote: > Hi, > > I've attached a text file containing the original and required > format and avoid the format being lost by just pasting it in the > email body. > > The original format is separated by a space, but need to replace the > space with a comma, so it

Re: String Formatting by Column

2011-06-24 Thread Jim Gibson
At 9:45 AM +0200 6/24/11, Wernher Eksteen wrote: Hi, I've attached a text file containing the original and required format and avoid the format being lost by just pasting it in the email body. The original format is separated by a space, but need to replace the space with a comma, so it will

Re: String Formatting by Column

2011-06-24 Thread Dermot
On 24 June 2011 09:53, Wernher Eksteen wrote: > Hi, > > Thanks for the tip, will try to figure it out on the weekend and come back > if I'm > stuck. > > Just a few questions before I try this... > > Does these modules have the ability to add the commas in the way I need them > to be? Yes. When yo

Re: String Formatting by Column

2011-06-24 Thread Wernher Eksteen
Hi, Thanks for the tip, will try to figure it out on the weekend and come back if I'm stuck. Just a few questions before I try this... Does these modules have the ability to add the commas in the way I need them to be? The CVS_XS.pm module seems more flexible/powerful than the CVS.pm one or am

Re: String Formatting by Column

2011-06-24 Thread Dermot
On 24 June 2011 08:45, Wernher Eksteen wrote: > Hi, > > I've attached a text file containing the original and required format and > avoid the format > being lost by just pasting it in the email body. > > The original format is separated by a space, but need to replace the space > with a comma, > s

String Formatting by Column

2011-06-24 Thread Wernher Eksteen
Hi, I've attached a text file containing the original and required format and avoid the format being lost by just pasting it in the email body. The original format is separated by a space, but need to replace the space with a comma, so it will become a comma delimited csv file which I will then i

Re: command formatting

2011-05-05 Thread Rob Dixon
ecute this command in perl script. i need to use qx/command/; > but i am stuck in formatting this command. there are so many syntax error > > can you please reformat this command with proper double qoutes, single quotes > wherever necessary Is the command line correct as it stands? Does

command formatting

2011-05-05 Thread Irfan Sayed
 Hi all, i have command like this: signtool.exe sign /f "\\bvctrlbm18-\Digital Signature\sympfx.pfx" /p "test"  "C:\workspace\ESM\Convergence\Trunk\bin\ESMPolicyToCCSStandard.exe" i need to execute this command in perl script. i need to use qx/command/; but

Re: Formatting Question

2008-09-16 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello Hello, I am sure the answer to this question is very simple. I have a number value which I am inserting into a string I am building. How can I append the number into the string so that it will always be 2 characters in length? In other words if the month is 9, h

Re: Formatting Question

2008-09-16 Thread Dermot
2008/9/17 <[EMAIL PROTECTED]>: > Hello > > I am sure the answer to this question is very simple. I have a number value > which I am inserting into a string I am building. How can I append the number > into the string so that it will always be 2 characters in length? In other > words if the mont

Re: Formatting Question

2008-09-16 Thread Mr. Shawn H. Corey
On Tue, 2008-09-16 at 17:32 -0700, [EMAIL PROTECTED] wrote: > Hello > > I am sure the answer to this question is very simple. I have a number value > which I am inserting into a string I am building. How can I append the number > into the string so that it will always be 2 characters in length?

Formatting Question

2008-09-16 Thread andrewmchorney
Hello I am sure the answer to this question is very simple. I have a number value which I am inserting into a string I am building. How can I append the number into the string so that it will always be 2 characters in length? In other words if the month is 9, how can I make it appear as "09"?

Re: Text formatting issues

2008-05-11 Thread Dr.Ruud
hotkitty schreef: > I've been reading through the modules and the link you provided but it > seems pretty involved. I don't think it should be very difficult: all > that I am trying to do is create a multi-page PDF file with text in > it. Isn't there an easier way to do that? Alternatives to cons

Re: Text formatting issues

2008-05-11 Thread Rob Dixon
hotkitty wrote: > > Well, it should be a pretty straightforward thing, right? No. Sizing and placing text in a page isn't trivial, and people pay huge amounts of money for DTP software to achieve it conveniently. > There has to be someone, somewhere that has taken text and created a pdf file > w

Re: Text formatting issues

2008-05-11 Thread hotkitty
On May 9, 11:50 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > hotkittywrote: > > On May 7, 8:40 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > >>hotkittywrote: > >>> First and foremost thanks for all the help I've received on this > >>> board, especially Gunnar who keeps this place running! > >>> I've com

Re: Text formatting issues

2008-05-11 Thread hotkitty
On May 9, 11:50 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > hotkittywrote: > > On May 7, 8:40 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > >>hotkittywrote: > >>> First and foremost thanks for all the help I've received on this > >>> board, especially Gunnar who keeps this place running! > >>> I've com

Re: Text formatting issues

2008-05-09 Thread Rob Dixon
hotkitty wrote: > On May 7, 8:40 am, [EMAIL PROTECTED] (Rob Dixon) wrote: >> hotkitty wrote: >>> First and foremost thanks for all the help I've received on this >>> board, especially Gunnar who keeps this place running! >>> I've come a long way in my code and am trying to format some text and >>>

Re: Text formatting issues

2008-05-09 Thread hotkitty
On May 7, 8:40 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > hotkitty wrote: > > First and foremost thanks for all the help I've received on this > > board, especially Gunnar who keeps this place running! > > > I've come a long way in my code and am trying to format some text and > > then put it into

Re: Text formatting issues

2008-05-07 Thread Dr.Ruud
hotkitty schreef: > #!/usr/bin/perl Missing: use strict; > use warnings; > $main_text->text("$newtext"); Why quoted? -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Text formatting issues

2008-05-07 Thread Rob Dixon
hotkitty wrote: > First and foremost thanks for all the help I've received on this > board, especially Gunnar who keeps this place running! > > I've come a long way in my code and am trying to format some text and > then put it into a nice pdf file. My problem is putting the formatted > text into

Re: Text formatting issues

2008-05-07 Thread Gunnar Hjalmarsson
hotkitty wrote: First and foremost thanks for all the help I've received on this board, especially Gunnar who keeps this place running! Thanks, but this place is kept running by quite a few helpful contributors. I've come a long way in my code and am trying to format some text and then put it

Text formatting issues

2008-05-07 Thread hotkitty
First and foremost thanks for all the help I've received on this board, especially Gunnar who keeps this place running! I've come a long way in my code and am trying to format some text and then put it into a nice pdf file. My problem is putting the formatted text into the pdf and for it to displa

Formatting output after search and replace

2008-04-30 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

Re: Formatting output after search and replace

2008-04-29 Thread Chas. Owens
On Tue, Apr 29, 2008 at 6:06 PM, melody <[EMAIL PROTECTED]> wrote: snip > #!/usr/bin/perl > use warnings; > use strict; snip Good, keep this up snip > my @array; > my @replacearray; snip Try to declare your variables where you initialize them. snip > open FHR,'<',"repl.txt"; > open OUT,'

Formatting output after search and replace

2008-04-29 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

Re: formatting a string

2007-07-04 Thread Mumia W.
On 07/03/2007 08:32 PM, Joseph L. Casale wrote: I have an array with the following data in it: /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC (Win2003 Ent x64).vmx /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc 1.vmdk /vmfs/volum

RE: formatting a string

2007-07-03 Thread Prabu Ayyappan
PM To: Joseph L. Casale; beginners@perl.org Subject: Re: formatting a string A quick solutionMay be you can enhance it more as you like.. @discarr = ('/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC (Win2003 Ent x64).vmx','

RE: formatting a string

2007-07-03 Thread Joseph L. Casale
Yup, lol... Wish I understood this! What is the line that does the search called? What do I look up to read up on this? Thanks! jlc From: Prabu Ayyappan [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 10:55 PM To: Joseph L. Casale; beginners@perl.org Subject: Re: formatting a string A

Re: formatting a string

2007-07-03 Thread Prabu Ayyappan
A quick solutionMay be you can enhance it more as you like.. @discarr = ('/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC (Win2003 Ent x64).vmx','/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc 1.vmdk','/vmfs/volumes/467f06

Re: formatting a string

2007-07-03 Thread Tom Phoenix
On 7/3/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: I always deal with indices' 1 through to the end in the function in question, so it's easy to get the second indices (First disc) and so on. Huh? I need to manipulate the path though now, I am wanting to search for *all* the text followi

formatting a string

2007-07-03 Thread Joseph L. Casale
I have an array with the following data in it: /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC (Win2003 Ent x64).vmx /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc 1.vmdk /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2

Re: Formatting/presenting regex

2007-01-03 Thread John W. Krahn
Owen wrote: > I have this regex to look at an Apache log. > > m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) > ([^"]+)" (\d{3}) (\d+|-) ".+"$/; > > Would like to set it out in a bit more readable form a la Perl Cook Book and > others > > eg > > m/ > ^(\S+)# Commen

Re: Formatting/presenting regex

2007-01-03 Thread Wiggins d'Anconia
odifier on the end of the regex to allow this type of formatting. You then, according to perldoc perlretut, can either backslash "real" spaces or put them in a character class. See, perldoc perlretut for more. Can someone give me a pointer as to how to go about this. HT

Formatting/presenting regex

2007-01-03 Thread Owen
I have this regex to look at an Apache log. m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) ([^"]+)" (\d{3}) (\d+|-) ".+"$/; Would like to set it out in a bit more readable form a la Perl Cook Book and others eg m/ ^(\S+) # Comment \S+# Comment \S+

Re: Formatting Question

2006-01-04 Thread Tom Phoenix
On 1/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Let's say I have the following numbers and I want to print them out so they > are formatted in money terms: Have you seen this sub? It's from p. 184 of the llama book (Learning Perl, 4th ed.). sub big_money { my $number = sprintf "%.2

Re: Formatting Question

2006-01-04 Thread Jeremy Vinding
[EMAIL PROTECTED] wrote: Hello, Here's my question. Let's say I have the following numbers and I want to print them out so they are formatted in money terms: examples: 10834.00 1939432.00 to print out as: $10,834.00 $1,939,432.00 How can I do this? I was suspecting that the "p

Formatting Question

2006-01-04 Thread Sanbuah
Hello, Here's my question. Let's say I have the following numbers and I want to print them out so they are formatted in money terms: examples: 10834.00 1939432.00 to print out as: $10,834.00 $1,939,432.00 How can I do this? I was suspecting that the "printf" or "sprintf" function

Re: formatting text

2005-11-29 Thread Brano Gerzo
Ing. Branislav Gerzo [IBG], on Tuesday, November 29, 2005 at 17:14 (+0100) wrote: IBG> And I'd like to print: IBG> |Name: Branislav | IBG> |Surname.: Gerzo | IBG> 26.^

Re: formatting text

2005-11-29 Thread Ing. Branislav Gerzo
Jeff 'japhy' Pinyan [JP], on Tuesday, November 29, 2005 at 09:12 (-0500 (EST)) wrote the following: Jeff, Perl6::Form is so powerful. But I can't find how to properly do this: I have values: ('Name','Branislav'); ('Surname','Gerzo'); And I'd like to print: |Name: Branislav

Re: formatting text

2005-11-29 Thread Ing. Branislav Gerzo
Jeff 'japhy' Pinyan [JP], on Tuesday, November 29, 2005 at 09:12 (-0500 (EST)) thoughtfully wrote the following: >> I'd like to know if there is module for following: JP> Yes, Perl6::Form. It's a Perl 5 implementation of Perl 6's formats. sometime is better ask, than DIY. Thanks a lot Japhy, thi

Re: formatting text

2005-11-29 Thread Jeff 'japhy' Pinyan
On Nov 29, Ing. Branislav Gerzo said: I'd like to know if there is module for following: Yes, Perl6::Form. It's a Perl 5 implementation of Perl 6's formats. 112 12345678901234567890 === OUT === | This is just | | small sentence | | about nothing. | === OUT === So, I

formatting text

2005-11-29 Thread Ing. Branislav Gerzo
Hello all, I'd like to know if there is module for following: We have text: === IN === This is just small sentence about nothing. === IN === And I like to format it as follows: 112 12345678901234567890 === OUT === | This is just | | small sentence | | about nothing. | ==

RE: Formatting Variables

2005-10-12 Thread Ryan Frantz
> -Original Message- > From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 12, 2005 5:31 PM > To: Ryan Frantz > Cc: Perl Beginners List > Subject: Re: Formatting Variables > > Ryan Frantz wrote: > > Perlers, > > > >

Re: Formatting Variables

2005-10-12 Thread Wiggins d'Anconia
Ryan Frantz wrote: > Perlers, > > > > Is there are way to format a variable before placing it into an array or > hash? I have several variables that contain floating point numbers that > I format prior to printing out: > > > > my $float = "12.3456"; > > print "%2.1f\n", $float; > perld

Formatting Variables

2005-10-12 Thread Ryan Frantz
Perlers, Is there are way to format a variable before placing it into an array or hash? I have several variables that contain floating point numbers that I format prior to printing out: my $float = "12.3456"; print "%2.1f\n", $float; I'd like to place these scalars into an array for l

perldoc formatting

2005-07-10 Thread christopher . l . hood
Ok basically I have written a module, and it works, I have updated the documentation in the module, and it works for the most part. What I am seeing is that when I use a single quote that the line looks like this when you use perldoc. ookup::GetInfo(’$affiliate’,’$ip_address’,’$dsl

Custom message formatting callback for Log::Dispatch

2005-07-08 Thread Dan Fish
I want to set up Log::Dispatch with two outputs... "file" and "email". I'd like to use a callback function to do custom formatting of the message based on whether the output is going to a logfile or email. I.E. a one line entry if sent to logfile and a verbose descri

Re: [Correction] Text formatting in perl (do I always have to open the txtfile in landscape view?)

2005-03-01 Thread John Doe
My apologies, I have to withdraw the following > You can't just change the suffix of a file to make it readable by an > application as open office. OO is not a text editor dealing with human > readable text; OO stores it's .swx files in a binary format (eventually as > compressed XML, I'm not sure

Re: Text formatting in perl (do I always have to open the txtfile in landscape view?)

2005-03-01 Thread John Doe
Hi Harold You can't just change the suffix of a file to make it readable by an application as open office. OO is not a text editor dealing with human readable text; OO stores it's .swx files in a binary format (eventually as compressed XML, I'm not sure at the moment). Use a real text editor (

Text formatting in perl (do I always have to open the txtfile in landscape view?)

2005-03-01 Thread Harold Castro
Hi, I wrote a perl script that will parse a log file and output it into a text file. I made its filename to end in .swx so that it will by default open in openoffice.org. My problem is that, when you open the file, each line cannot accomodate the default margin settings of openoffice.org such tha

RE: formatting problem

2004-10-30 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : Hi all, : : I have little formatting problem, we have code: : : sub test { : $sth = $dbh->prepare_cached(<execute('12.12.12.12', 80, proxy, '2002-12-12'); : $sth->finish; : return; : } Don'

Re: formatting problem

2004-10-30 Thread Bob Showalter
Ing. Branislav Gerzo wrote: Hi all, I have little formatting problem, we have code: sub test { $sth = $dbh->prepare_cached(<execute('12.12.12.12', 80, proxy, '2002-12-12'); $sth->finish; return; } this of course doesn't work, because SQL is not at begining o

formatting problem

2004-10-30 Thread Ing. Branislav Gerzo
Hi all, I have little formatting problem, we have code: sub test { $sth = $dbh->prepare_cached(<execute('12.12.12.12', 80, proxy, '2002-12-12'); $sth->finish; return; } this of course doesn't work, because SQL is not at begining of the line. I tried: $s

Re: Number formatting

2004-08-04 Thread Randy W. Sims
On 8/4/2004 10:02 PM, [EMAIL PROTECTED] wrote: Hi all, I am doing conversions from square metres to square feet for example. I have a regex that removes any commas or spaces in a number. I then do the conversion return an integer but then want to display the number with the commas or spaces put bac

Re: Number formatting

2004-08-04 Thread Chris Devers
On Thu, 5 Aug 2004 [EMAIL PROTECTED] wrote: but then want to display the number with the commas or spaces put back in to make it easier to read. What do you suggest? Two minutes of Googling found dozens of suggestions. This may be the best one: How can I output my numbers with commas added? T

Number formatting

2004-08-04 Thread Colin . Johnstone
Hi all, I am doing conversions from square metres to square feet for example. I have a regex that removes any commas or spaces in a number. I then do the conversion return an integer but then want to display the number with the commas or spaces put back in to make it easier to read. What do

RE: Help on output formatting

2004-08-02 Thread Marcos . Rebelo
maybe you can do something like: ($text) = ($text =~ /([0-9]+)/); Before printing the text. > -Original Message- > From: sudhindra k s [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 10:52 AM > To: [EMAIL PROTECTED] > Subject: Help on output formatting > &

Help on output formatting

2004-08-02 Thread sudhindra k s
  Hi I have a script which the following output: " abc 123456 xyz " Now as you can see apart from the number "123456" there are a lot of blank spaces and some aplha characters as well. Now i want the output to be only "123456" without the white spa

Re: Efficient Formatting

2004-07-21 Thread John W . Krahn
On Wednesday 21 July 2004 10:52, Kent, Mr. John \(Contractor\) wrote: > > Greetings, Hello, > Want to print out a formattted line of numbers > > Is there a way to avoid having to: > >printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , > > $num10; ? > > Something like > printf "%8d" * 10

Re: Efficient Formatting

2004-07-21 Thread Randal L. Schwartz
> "John" == John \ Kent <[EMAIL PROTECTED]> writes: John> Something like John> printf "%8d" * 10, @numray; printf "%8d " x @numray, @numray; That's even in the answers of the llama book. You need a llama book. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

RE: Efficient Formatting

2004-07-21 Thread Ed Christian
Kent, Mr. John (Contractor) wrote: > Greetings, > > Want to print out a formattted line of numbers > > Is there a way to avoid having to: > >> printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , >> $num10; ? > > Something like > printf "%8d" * 10, @numray; > How 'bout: printf "%8d

Efficient Formatting

2004-07-21 Thread Kent, Mr. John \(Contractor\)
Greetings, Want to print out a formattted line of numbers Is there a way to avoid having to: >printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , $num10; ? Something like printf "%8d" * 10, @numray; Thank you, John Kent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: displaying to_char formatting in Perl

2004-05-27 Thread Andrew Gaffney
Wiggins d Anconia wrote: Please bottom post I only top-post when other people in the thread do because it keeps things a little less confusing. It annoys the crap out of me, though. -- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548 -- To unsubscribe, e-mail: [EMAI

Re: displaying to_char formatting in Perl

2004-05-27 Thread Wiggins d Anconia
it in all programs.) > > > > -Original Message- > > From: Jan Eden [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 27, 2004 1:38 PM > > To: MCMULLIN, NANCY; Perl Lists > > Subject: RE: displaying to_char formatting in Perl > > > >

Re: displaying to_char formatting in Perl

2004-05-27 Thread Andrew Gaffney
MCMULLIN, NANCY wrote: Thank you kindly. That fixed it. No problem. I do that all the time ;) -- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: displaying to_char formatting in Perl

2004-05-27 Thread Andrew Gaffney
bout CGI:Carp.. I will include it in all programs.) -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:38 PM To: MCMULLIN, NANCY; Perl Lists Subject: RE: displaying to_char formatting in Perl Hi Nancy, MCMULLIN, NANCY wrote on 27.05.2004: The error

RE: displaying to_char formatting in Perl

2004-05-27 Thread MCMULLIN, NANCY
Thank you kindly. That fixed it. -Original Message- From: Andrew Gaffney [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:42 PM To: MCMULLIN, NANCY Cc: Wiggins d Anconia; [EMAIL PROTECTED] Subject: Re: displaying to_char formatting in Perl MCMULLIN, NANCY wrote: > The error

Re: displaying to_char formatting in Perl

2004-05-27 Thread Andrew Gaffney
MCMULLIN, NANCY wrote: The error is "Internal Server Error". As soon as I comment out the (2)lines below: -- TO_CHAR(ie_dollar_amt, '$999,999.99'), it works just fine. Here's the code: == #!c:/activeperl/bin/perl use strict; use DBI; use DBD::Oracle; use CGI qw(:standard *table *Tr

RE: displaying to_char formatting in Perl

2004-05-27 Thread MCMULLIN, NANCY
" - no data. (Thank you for reminding me about CGI:Carp.. I will include it in all programs.) -Original Message- From: Jan Eden [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:38 PM To: MCMULLIN, NANCY; Perl Lists Subject: RE: displaying to_char formatting in Perl Hi Nancy,

RE: displaying to_char formatting in Perl

2004-05-27 Thread Wiggins d Anconia
=> 0, > -cellspacing => 3, > -width => 700, > } ), > th( \%bgca, [EMAIL PROTECTED] ); > > foreach (@$ar) { > print start_Tr(), > td( \%bgca, > $_ > ),

RE: displaying to_char formatting in Perl

2004-05-27 Thread Jan Eden
Hi Nancy, MCMULLIN, NANCY wrote on 27.05.2004: >The error is "Internal Server Error". >As soon as I comment out the (2)lines below: >-- TO_CHAR(ie_dollar_amt, '$999,999.99'), >it works just fine. As suggested before: use CGI::Carp qw(fatalsToBrowser); You'll get a more informative error messag

RE: displaying to_char formatting in Perl

2004-05-27 Thread MCMULLIN, NANCY
foreach (@$ar) { print start_Tr(), td( \%bgca, $_ ), end_Tr; $NUM_OF_ROWS++; } print end_table; my ($name, $value); print end_html; warn "error: $DBI::errstr\

Re: displaying to_char formatting in Perl

2004-05-27 Thread Wiggins d Anconia
> When attempting to display a formatted string in Perl using Oracle - > > SELECT >TO_CHAR(dollar_amt, '$999,999.99') >FROM >table; > > It breaks the code. It does work as a straight SQL query outside of Perl. Any ideas? > "It breaks the code" is a rather vague statement. How d

displaying to_char formatting in Perl

2004-05-27 Thread MCMULLIN, NANCY
When attempting to display a formatted string in Perl using Oracle - SELECT TO_CHAR(dollar_amt, '$999,999.99') FROM table; It breaks the code. It does work as a straight SQL query outside of Perl. Any ideas? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Conditional formatting in Excel

2004-03-09 Thread Saadat Saeed
Okay - why doesn't conditional formatting work? Are my OLE statements correct - or is this more of an Excel issue??? (Over here I am extracting some data from Lotus Notes and dumping it into Excel --- all works fine except for the conditional formatting) use strict; use Win32::OLE; my $fp;

  1   2   3   >