Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi, Use this, because with the previous the selected output for any print, write,etc will be DM, not the desired, so:
Will select again the previous output you had before calling select, but assigning the $- variable for that filehandle But better is to use lexical variables as filehandles, in the code it seems like you have a register to asign each time, and write to a list of files, why not something like this:
By the way take a look at Perl6::Form, it have a lot of improvements, and not these limitations that Perl 5 formats has. And the why this seems to happen, think it is because the DM is a global symbol, and it doesn't get reset the values automatically because when you close the filehandle the DM symbol is not erased... Regards,
fmerges at irc.freenode.net
In reply to Re^2: Format headers and filehandles
by fmerges
|
|