Owen <[EMAIL PROTECTED]> suggested: > Well perhaps for a single debugging line, it doesn't matter > too much, but consider a program where endless things can and > do go wrong. Peppering your script with > > or die "Can't open the file Data1 $!\n"; or die "Can't open > the file Data2 $!\n"; or die "Can't open the file Data3 $!\n"; etc > > really helps track down where to look > > The rule is to always check the return value
I'd go even a step farther and suggest that you make sure of your arguments, too: open( IN, $file ) or die "Can't open '$file': $!\n"; That helps a lot in tracking down problems that arise because of wrong assumptions (i.e. that you've got a filename right). HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>