CGI/Perl Guide
|
Learning Center
|
Forums
|
Advertise
|
Login
Site Search:
in
Perl Guide
PerlGuru Forums
Learning Ctr
MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN
Home
:
Perl Programming Help
:
Regular Expressions
:
Justification in Perl
Print Thread
C_PRASANNA
Novice
Feb 21, 2013, 4:34 AM
Post #1 of 3 (16709 views)
Justification in Perl
Can't Post
Hi Guys,
How to justify the below,
Input = 1.2
Output = 001.2
I need the above output in the Perl AS simple AS possible.
By,
Prasanna - India
FishMonger
Veteran / Moderator
Feb 21, 2013, 6:31 AM
Post #2 of 3 (16706 views)
Re: [C_PRASANNA] Justification in Perl
[
In reply to
]
Can't Post
perldoc -f sprintf
http://perldoc.perl.org/functions/sprintf.html
Or, even more simple - use concatination
(This post was
edited
by FishMonger on Feb 21, 2013, 6:32 AM)
paxxus
New User
Feb 26, 2013, 5:00 PM
Post #3 of 3 (16670 views)
Re: [C_PRASANNA] Justification in Perl
[
In reply to
]
Can't Post
printf( "%05.1f\n", $input );
Announcements
PerlGuru Announcements
Perl Programming Help
Frequently Asked Questions
Beginner
Intermediate
Advanced
Regular Expressions
mod_perl
DBI
Win32 Programming Help
Fun With Perl
Perl Quizzes - Learn Perl the Fun Way
Perl Golf
Perl Poetry
Need a Custom or Prewritten Perl Program?
I need a program that...
I Need a Programmer for Freelance Work
Throw Down The Gauntlet
General Discussions
General Questions
Feedback
Tutorial/Article Suggestions for The Learning Cent
Internet Security
Other Programming Languages
Javascript
PHP
Search
this forum
this category
all forums
for
All words
Any words
Whole Phrase
(
options
)
Powered by
Gossamer Forum v.1.2.0
Web Applications
&
Managed Hosting
Powered by Gossamer Threads
Visit our
Mailing List Archives