Thread pm-Modul: DATA-Teil und 1; inkompatibel? (15 answers)
Opened by RalphFFM at 2008-01-09 11:08

pq
 2008-01-09 11:57
#104528 #104528
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ cat Foo.pm 
package Foo;

sub data {
while (<DATA>) {
warn __PACKAGE__." <$_>\n";
}
}

1;

__DATA__
23
42
99
$ perl -wle'use Foo;
Foo::data()'
Foo <23
>
Foo <42
>
Foo <99
>

also hier klappt das ausgezeichnet.
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
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

View full thread pm-Modul: DATA-Teil und 1; inkompatibel?