[Chicago-talk] writing a log with Cron, Daemons, Perl

Jay Strauss me at heyjay.com
Mon Sep 8 07:24:07 CDT 2003


> Remember $| only works for the currently selected output filehandle. So
you
> will have to select your LOG filehandle then set $|.

To remember, requires I knew it at some point :)

> I like using IO::File for this sort of thing myself, since it looks
> prettier (IMHO).
>
>     use IO::File;
>     my $log = File::Handle->new();
>     $log->open( ">/home/jstrauss/bin/test.log" );
>     $log->autoflush( 1 );
>     print $log "blah";

I'd say definitely a matter of opinion, but probably more self documenting.

Thanks
Jay





More information about the Chicago-talk mailing list