in reply to Re: Can't get a simple log creator to work!
in thread Can't get a simple log creator to work!

my perl book didn't say anything about that, really the filehandles section made no sense (this is the o'reilley book). how do i use $main::LOG to store a filename to it? (it would be the name of the log file in this case right?)

Replies are listed 'Best First'.
Re^3: Can't get a simple log creator to work!
by Anonymous Monk on Feb 23, 2010 at 06:27 UTC
    Which O'reilley book?

    I suggest you start with perlintro, and perlopentut, but basically

    open my($fh), '>', '/f/o/o' or die "Can't clobber /f/o/o : $!"; print $fh "stuff\n"; ...
    or the slick version
    use autodie; open my($fh), '>' '/f/o/o'; print $fh "stuff\n"; ...