5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
# Modul1.pm
package Porjekt::Modul1;
use strict;
sub new
{
my($package) = @_;
my $this = bless({Var1 => 1, Var2 => 2}, $package);
return $this;
}
1;
1
2
3
4
5
6
7
8
9
10
11
12
13
# Main.pl
#!/usr/bin/perl -w
use strict;
use Projekt::Modul1;
my $mod1 = Projekt::Modul1->new;
sub TuWas
{
my($modul) = @_;
}
TuWas($mod1);
TuWas(\$mod1);
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl my $string = "Hallo"; TuWas($string); print $string,"\n"; sub TuWas{ $_[0] = "Perl-Community.de"; }
1 2 3 4 5 6 7 8
my $string = "Hallo"; TuWas($string); print $string,"\n"; sub TuWas{ my ($string2) = @_; $string2 = "Perl-Community.de"; }
5 Einträge, 1 Seite |