Thread Perl-Community.de wird zwei Jahre alt: 3.August 2005 (26 answers)
Opened by Strat at 2005-08-01 15:16

Ronnie
 2005-08-15 23:30
#88788 #88788
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
[quote=esskar,15.08.2005, 18:57][quote=sri,15.08.2005, 18:07]pugs -e '"Happy Birthday!".say'[/quote]
emm...
was kommt denn da raus?
sieht ja schrecklich aus![/quote]
sieht doch in perl5 (fast) auch so aus (wenn man es möchte ?!) :
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use strict;
use warnings;

package String;

sub new { my ($class, $text) = @_; bless \$text, $class; }
sub say { my $self = shift; local($\) = "\n"; print ${$self}; }

package main;

my $foo = new String ('Hello World!');
$foo->say();
say $foo;
\n\n

<!--EDIT|Ronnie|1124134319-->

View full thread Perl-Community.de wird zwei Jahre alt: 3.August 2005