Schrift
[thread]9040[/thread]

Umgang mit Zahlen...



<< >> 5 Einträge, 1 Seite
ManfredG.
 2007-05-26 02:46
#76984 #76984
User since
2007-05-26
11 Artikel
BenutzerIn
[default_avatar]
Hallo zusammen,
ich bin immer noch damit beschäftigt ein Perl Script an meine Bedürfnisse anzupassen.

Mit dieser Zeile
. $t->{betrag} .
bekomme ich z.B. diesen Wert 5.0000
Ich benötige aber sinngemäß diese Ausgabe 500

Wie kann ich den Punkt entfernen und die letzten zwei 00 entfernen?

Herzlichen Dank für Euere Hilfe.

Liebe Grüße
Manfred
bloonix
 2007-05-26 03:44
#76985 #76985
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Code: (dl )
print $t->{betrag} * 100, "\n";

und wie wäre es, wenn du hier anfängst: Perldoc:Perlintro
und dich dann Stück für Stück nach vorne arbeitest ;)\n\n

<!--EDIT|opi|1180137095-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
ManfredG.
 2007-05-26 03:53
#76986 #76986
User since
2007-05-26
11 Artikel
BenutzerIn
[default_avatar]
Klasse, 1000 Dank, das funktioniert ganz prächtig (;-))

Mit dem empfohlenen Link bekomme ich allerdings keine Info:
http://perldoc.perl.org/perlinto.html

Liebe Grüße
Manfred
pq
 2007-05-26 12:45
#76987 #76987
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
opi, warum schlägst du nicht die deutsche version von perlintro vor?
perlintro
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
bloonix
 2007-05-26 13:11
#76988 #76988
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
[quote=pq,26.05.2007, 10:45]opi, warum schlägst du nicht die deutsche version von perlintro vor?
perlintro[/quote]
ich sehe darin kein Problem, die englische Version vorzuschlagen ;)\n\n

<!--EDIT|opi|1180170796-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
<< >> 5 Einträge, 1 Seite



View all threads created 2007-05-26 02:46.