Re: SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-16 Thread Shlomi Fish
Hi Gary, On Wednesday 15 December 2010 14:42:56 Gary Stainburn wrote: > HI Shlomi, > > On Wednesday 15 December 2010 11:57:25 Shlomi Fish wrote: > [snip] > > > > while () { > > > > > > my $line=$_; > > > > Why are you doing this instead of: > > > > [code] > > while (my $line = ) > > { > >

Re: SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-15 Thread Gary Stainburn
HI Shlomi, On Wednesday 15 December 2010 11:57:25 Shlomi Fish wrote: [snip] > > > > while () { > > my $line=$_; > > Why are you doing this instead of: > > [code] > while (my $line = ) > { > } > [/code] > For two reason, (1) I've not written Perl in ages and forgotten much of the style and syn

Re: SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-15 Thread Shlomi Fish
Hi Gary, On Wednesday 15 December 2010 13:30:00 Gary Stainburn wrote: > Isn't it typical. Been working on this since yesterday, but as soon as I > post the question I find the answer· > > I've changed > > foreach my $line () { > > to > > while () { > my $line=$_; > Why are you doing this

SOLVED - Re: perl and pipes - reading from syslog-ng

2010-12-15 Thread Gary Stainburn
Isn't it typical. Been working on this since yesterday, but as soon as I post the question I find the answer· I've changed foreach my $line () { to while () { my $line=$_; and now it works perfectly. On Wednesday 15 December 2010 11:19:07 Gary Stainburn wrote: > Hi folks. > > I've writte