Tech
Previous Posts
Perl call by reference array subroutines
Data::FormValidator
for qw
constant ARRAY
sample "Class::Inspector" perl
find and grep with condition OR on the unix(linux)
ISA Perl
Perl, add session info to a tag like PHP
XAMPP
Windows Live Messanger and Yahoo Messenger
土曜日, 3月 10, 2007
Perl call by reference hash subroutines
#!/usr/bin/perl
my %data=();
sub1(\%data);
foreach $key ( sort keys %data ) {
print "$key:$data{$key} \n";
}
sub sub1{
my ($x) = @_;
for ($i = 0; $i <= 10 ; $i++)
{
$x->{$i} = $i;
}
}
ラベル:
hash
,
perl
posted by hi @
6:58 午後
0 Comments:
コメントを投稿
<< Home
0 Comments:
コメントを投稿
<< Home