Offer Kaye wrote:
> Hi,
> Can anyone tell me if it is possible to define 2 different formats for
> the same filehandle?
> 

Yes. Use the select command to select the filehandle of the file. Then
use the special variables $~ and $^ to change the format. The format
name can be anything you want but if it's the same a a filehandle, it
will be automatically assigned to that file handle.

See:
perldoc -f format
perldoc -f select
perldoc perlform
perldoc perlvar (and search for "$~")


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by
doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to