lhp@nereida:~/Lperl/src$ cat -n ./fileparameter2.pl 1 #!/usr/bin/perl -w 2 use strict; 3 4 sub welcome { 5 my $fh = shift; 6 7 print $fh "Welcome ...\n"; 8 } 9 10 open(FILE, ">test.txt"); 11 my $file = \*FILE; 12 welcome($file); 13 close($file); lhp@nereida:~/Lperl/src$ ./fileparameter2.pl lhp@nereida:~/Lperl/src$ cat test.txt Welcome ...
#!/usr/local/bin/perl5.8.0 -w sub mundo { "mundo\n" } *hola = \&mundo; $mundo = "hola"; $hola = "bienvenido"; print "$mundo ",&hola();
Casiano Rodríguez León