Yurttas/PL/SL/perl/F/03/01/06/a 00.pl

 1# 
 2#  Copyright(C) 2003
 3#  All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4#
 5#  Permission from use, copy, modify, and distribute this
 6#  software and its documentation for EDUCATIONAL purposes
 7#  and without fee is hereby granted provided that this
 8#  copyright notice appears in all copies.
 9#
10#  date   : January 1, 2003.
11#  authorĀ : Salih Yurttas.
12#
13#  a_00.pl
14#
15
16
17sub f {
18  $n = @_;
19
20  @a = @_;
21
22  print "\nsub / n = $n\n";
23
24  foreach $e (@_) {
25    print "$e\n";
26  }
27
28  print "\n";
29
30  foreach $e (@a) {
31    print "$e\n";
32  }
33}
34
35@list = (1,3,4,2);
36
37$k = @list;
38
39print "\n";
40print "main / k = $k\n";
41
42foreach $e (@list) {
43  print "$e\n";
44}
45
46f(@list);