Sponsored Content
Top Forums Shell Programming and Scripting it's urgent ! round number in perl scripting Post 302339342 by pritish.sas on Thursday 30th of July 2009 09:32:25 AM
Old 07-30-2009
it's urgent ! round number in perl scripting

Code:
my $number = 12.345673412

I need 3 digits after decimal or after dot(.)

i mean , i need only 12.345

I used int(), ceil(), floor() but it gives me only 12

I need it.

Last edited by Yogesh Sawant; 08-03-2009 at 02:58 AM.. Reason: added code tags
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help needed in shell scripting......urgent

Dear friends, please help me to solve following problem. I'm running a frontend application from which i'll be invoking the shell script with arguments as given below -driver -w -p "ABC XYZ" -S -ds con -dn "abc xyz" i am getting $1=-driver $2=-w $3=-p $4="ABC $5=XYZ" $6=-S $7=-ds... (3 Replies)
Discussion started by: swamymns
3 Replies

2. Shell Programming and Scripting

round a number

In a shell script - How do I round a decimal number (contained in a variable) to the nearest whole number? (2 Replies)
Discussion started by: achieve
2 Replies

3. Shell Programming and Scripting

Please help me out:-Its Urgent-C Shell Scripting

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There... (0 Replies)
Discussion started by: Prince89
0 Replies

4. Shell Programming and Scripting

Umbrella Scripting(very Urgent)

Hi All, Can anybody help me to write the umbrella script for the following? I have three steps to do. STEP 1: CONVERT XML files to PS files STEP 2: CONVERT ALL PS FILES TO PDF FILES STEP 3: FTPING ALL PDF FILES TO THE SERVER. I have the codes for the above three steps. Now I... (6 Replies)
Discussion started by: sunitachoudhury
6 Replies

5. Shell Programming and Scripting

Urgent Korn Shell scripting Help Pleaaaase...

Hello All, Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation. I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
Discussion started by: solaix14
3 Replies

6. Shell Programming and Scripting

Using sed to round a number

Hey everyone, I was wondering if i am able to write a sed command to round a number to two decimal places. So for example: 1.58674 would be 1.58 I just want to chop off the numbers to the right of the second digit after the period. I know this is probably trivial but the closest i got was... (8 Replies)
Discussion started by: GmGeubt
8 Replies

7. Shell Programming and Scripting

Need urgent help with PERL scripting

From the attached file I to need pick all rows that have AVG2 column value larger than 0.050, and write those values in to a separate file. Help me on how I pick the approp value & output them onto a file. Very Thanks in advance. :b: (5 Replies)
Discussion started by: tonystark
5 Replies

8. Shell Programming and Scripting

Round off Number in File

Hi Guys, i am having a csv file where i need to round off numerical column to 2 decimal precision in specific columns. i need to ignore the first two line i.e the header columns and manipulate rest of the lines of the csv file. My columns are specific i.e i need to round off only 2nd,4th and... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
Font::TTF::Post(3pm)					User Contributed Perl Documentation				      Font::TTF::Post(3pm)

NAME
Font::TTF::Post - Holds the Postscript names for each glyph DESCRIPTION
Holds the postscript names for glyphs. Note that they are not held as an array, but as indexes into two lists. The first list is the standard Postscript name list defined by the TrueType standard. The second comes from the font directly. Looking up a glyph from a Postscript name or a name from a glyph number is achieved through methods rather than variable lookup. This class handles PostScript table types of 1, 2, 2.5 & 3, but not version 4. Support for version 2.5 is as per Apple spec rather than MS. The way to look up Postscript names or glyphs is: $pname = $f->{'post'}{'VAL'}[$gnum]; $gnum = $f->{'post'}{'STRINGS'}{$pname}; INSTANCE VARIABLES
Due to different systems having different limitations, there are various class variables available to control what post table types can be written. $Font::TTF::Post::no25 If set tells Font::TTF::Post::out to use table type 2 instead of 2.5 in case apps can't handle version 2.5. VAL Contains an array indexed by glyph number of Postscript names. This is used when writing out a font. STRINGS An associative array of Postscript names mapping to the highest glyph with that name. These may not be in sync with VAL. In addition there are the standard introductory variables defined in the standard: FormatType italicAngle underlinePosition underlineThickness isFixedPitch minMemType42 maxMemType42 minMemType1 maxMemType1 METHODS
$t->read Reads the Postscript table into memory from disk $t->out($fh) Writes out a new Postscript name table from memory or copies from disk $t->XML_element($context, $depth, $key, $val) Outputs the names as one block of XML BUGS
o No support for type 4 tables AUTHOR
Martin Hosken Martin_Hosken@sil.org. See Font::TTF::Font for copyright and licensing. perl v5.10.1 2009-01-21 Font::TTF::Post(3pm)
All times are GMT -4. The time now is 12:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy