Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write to two filehandles failes

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Joined
Feb 6, 2002
Messages
1,851
Location
IL
HI,

trying to print to FILE1 (default) and TEMP,results in error.I would expect that it should print to both filehandles with the same format $~ ....

select FILE1;
$~ = EventLogFormat;
open TEMP,">TEMP";
write ;
write TEMP;
#####################
error:

Undefined format "TEMP" called at D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl line 181.

Appreciate any advise.


Long live king Moshiach !
 
Try?

open TEMP,">TEMP.txt";

Your OS might not like the creation of file names without extensions.

-------------
Kirsle.net | Kirsle's Programs and Projects
 
Thanks,but this is not the case (Windows works well here).
Seems like the Perl insists that the Handle and the format names be identical...then it works.

Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top