MyFonc() doesn't do anything with its argument. The split call acts on $_, not @_. Your MyFonc might take whatever it gets from $_ as a glob, giving a list of file names to iterate over.
MyFunc() will work if you shift in the glob reference first. When MyFonc gets called, *FH is at eof. In between the two, call seek
myFunc(\*FH); seek FH, 0, 0; myFonc(\*FH); # the repaired one :)
After Compline,
Zaxo
In reply to Re: $_[0] as a filehandle
by Zaxo
in thread $_[0] as a filehandle
by jey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |