[ create a new paste ] login | about

Link: http://codepad.org/q82n8gNK    [ raw code | output | fork ]

appunti2 - Perl, pasted on Apr 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
sub alterazione_array
{
  local (*a) = $_[0];
  $a[0] = 1;
  $a[1] = 2;
}

local ($b) = ();

$b[0] = 9;
$b[1] = 8;
$b[2] = 7;

&alterazione_array (\@b);

print STDOUT $b[0] . " " . $b[1] . " " . $b[2] . "\n";


Output:
1
1 2 7


Create a new paste based on this one


Comments: