in reply to
How to make a copy of filehandle
Have a look at seek. You cannot store the file handle as you desire but the position in the file using tell and later go back using seek.
UPDATE: A few seconds too late I was.
Thanks to you two! I think this will do it. Easy :)
ps : yes I am aware $file isn't file name, I just didn't know how to write what I wanted.
so what? =)
No reason to edit or strike your post!!!
( addicted to the Perl Programming Language)
Use subroutines for code reuse
Master regular expressions
Write my GUIs with Perl
Abandon CGI in favor of some modern web framework
Put my code in modules
Create CPAN distributions
test and document my code as I write it
Write OOP with or without animal help
Finally switch to a modern Perl style
Create a killer application with Perl
Detoxify from Perl and PerlMonks
Choose another language because Perl is dead
Learn to program for mobile devices
Complete my secret world domination project
None, because the road to hell is paved with good intentions
Results (254 votes),