Hi,
This is Perl 5.004_04 for irix-n32
Does anyone know why $_[0] cannot be used as a filehandle?
In the example below myFunc doesn't work whereas myFonc does, do you know why?
#!/usr/bin/perl -w open FH, "<$myFile" or die "Can't open $myFile: $!\n"; &myFunc(\*FH); &myFonc(\*FH); sub myFunc { while (<$_[0]>) { #do something } } sub myFonc { my $handle = shift; while(<$handle>) { # do someything } }
thanks a lot
In reply to $_[0] as a filehandle by jey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |