There are ways to fake a filehandle by tieing it to a module, but that is a bit cumbersome. Looking at the Mail::Internet docs it seems that you can pass it an array reference instead of a filehandle ref.
Try this, I think it will work... my $mio = Mail::Internet([$data]); Rob -----Original Message----- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 2:58 PM To: Dan Muey; [EMAIL PROTECTED] Subject: RE: Variable instaed of GLOB REF > Howdy all! > > If you have a function that is expecting a FILEHANDLE as it's Sorry FILHANDLE Refence actually. > argument how could you supply it a variable instead? > > For instance: > > my $mio = Mail::Internet(\*STDIN); > ... > Which is peachy. > What I'd like to be able to do is use the data in > the variable $data instead of STDIN's data. > my $mio = Mail::Internet($data); > ... > So what would I need to do, assign $data to a FILEHANDLE > somehow and pass that FILEHANDLE off instead of STDIN or ??? I could pass it another filehandle ref, I just need to figure out how to assign $data to a filehandle and use that instead of STDIN right? If so how would one go about setting up a filehandle for a variable? Or wil the Glob reference automatically use $data if I did \*data ? Thanks! > > > TIA > > Dan > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]