Thread package and do (2 answers)
Opened by esskar at 2006-02-03 02:31

renee
 2006-02-03 02:47
#62580 #62580
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
so klappt es:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;
use warnings;

my $class = 'Foo';
my $foo = do{ eval "package $class; local \$/; <DATA>"};
print $foo;

package Foo;

_ _DATA_ _
Dies
ist
ein
Test
\n\n

<!--EDIT|renee|1138927778-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread package and do