Hi, I'm currently writing a script which contains a subroutine to write data to files. Currently I use open $fh, '>', "$basedir/$userdir/$outfile" or die "Can't write: $!\n"; which has the disadvantage, that the whole script dies if e.g. the userdir is not available.
Could you give me an advise how to just exit the subroutine if opening the filehandle fails, without exiting the whole script? Thanks in advance. Nikolaus -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
