[Melbourne-pm] An intermittent problem with open for append
Jacinta Richardson
jarich at perltraining.com.au
Wed May 28 17:22:29 PDT 2008
Craig Sanders wrote:
> in this instance, I'd recommend something very similar, but more like this:
>
> my $logdir='/home/foo/que';
> my $outfile="$logdir/$ip";
>
> if(open(OUT,'>>',$outfile)) {
> print OUT "$ip:t:date=",scalar localtime,"\n";
> }
> else {
> push @error, "Can't open $outfile for append: $!";
> }
All good points and I agree entirely.
All the best,
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
More information about the Melbourne-pm
mailing list