Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

printf uninitialized value

by Sun751 (Beadle)
on Aug 28, 2009 at 03:07 UTC ( [id://791817]=perlquestion: print w/replies, xml ) Need Help??

Sun751 has asked for the wisdom of the Perl Monks concerning the following question:

use strict; use warnings; my $line = "Appal"; printf "%8s$line\n";
In above code I am getting following error, Use of uninitialized value in printf Any suggestion? Please,
Oh! got it guys its printf format, should be
printf "%8s\n",$line;

Replies are listed 'Best First'.
Re: printf uninitialized value
by bluestar (Novice) on Aug 28, 2009 at 10:07 UTC
    use strict; use warnings; my $line = "Appal"; printf("%8s\n", $line);
Re: printf uninitialized value
by Anonymous Monk on Aug 28, 2009 at 04:13 UTC
    perldoc -f printf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://791817]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found