fork download
  1. #!/usr/bin/perl
  2. sub alterazione_array
  3. {
  4. local (*a) = $_[0];
  5. $a[0] = 1;
  6. $a[1] = 2;
  7. }
  8.  
  9. local ($b) = ();
  10.  
  11. $b[0] = 9;
  12. $b[1] = 8;
  13. $b[2] = 7;
  14.  
  15. &alterazione_array (\@b);
  16.  
  17. print STDOUT $b[0] . " " . $b[1] . " " . $b[2] . "\n";
  18.  
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
1 2 7