|
-
Aug 8th, 2005, 08:31 PM
#1
Thread Starter
Frenzied Member
CGI Question
Hi guys, I'm pretty new to CGI programming. I have a question here, I'm working on a poll script, but could not understand what does this line mean?
foreach my $key (keys %results) {
my $percent = ($results{$key} / $total_votes ) * 100;
$percents{$key} = sprintf("%2d %%", $percent);
}
The main part is that sprintf("%2d %%", $percent), what does sprintf mean? And what are those %2d %%?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|