Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Jim Gibson
At 7:40 PM -0500 3/21/10, Harry Putnam wrote: Linux Expert writes: Again... appears to work. However the log file takes quite a long time to starting showing any action, and then stay well behind the console output. Try adding the following line after your 'use warnings' line: $|++;

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Harry Putnam
Linux Expert writes: >> Again... appears to work. >> >> However the log file takes quite a long time to starting showing any >> action, and then stay well behind the console output. >> > > Try adding the following line after your 'use warnings' line: > $|++; > > That will disable output buffering

Re: filter script read STDIN from named pipe >file

2010-03-21 Thread Linux Expert
> Again... appears to work. > > However the log file takes quite a long time to starting showing any > action, and then stay well behind the console output. > Try adding the following line after your 'use warnings' line: $|++; That will disable output buffering on the currently-selected filehandl

Re: perl system return 256

2010-03-21 Thread Dr.Ruud
syd_p wrote: On 18 Mar, 23:10, rvtol+use...@isolution.nl ("Dr.Ruud") wrote: syd_p wrote: The embedded system call fails ie returns 256 [i caught the code with a $ret = system (" /usr/bin/cat /tmp/TT.sql | /tmp/TT.cmd");] perldoc -f system Ta. I did look at the ouput from perldoc -f system

Re: detect disk full when write to handle

2010-03-21 Thread C.DeRykus
On Mar 20, 1:45 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: > C.DeRykus wrote: > > On Mar 19, 8:31 pm, godsarm...@gmail.com (Walt Chen) wrote: > > > > See: perldoc -q buffer > > > This will explain why 'syswrite' will report error, say a > > full disk partition, when print may not due to buffe

filter script read STDIN from named pipe >file

2010-03-21 Thread Harry Putnam
I'm thinking this is some kind of buffer issue and wondering if anything can be done about it: The script included below is really simple so I hope its not some script error causing this. How script is used: System logger is setup to write everything but mail and news logs to a named pipe: On

Re: map foreach loop into array

2010-03-21 Thread Shlomi Fish
On Sunday 21 Mar 2010 17:44:49 perl wrote: > I have been trying to make this thing work .. > this is not a actual code > @s = { some elemnts}; > foreach my $s(@s){ > # i made that $s into array something like @data1 > foreach my$data(@data1) >if( $data =~ some text){ >

map foreach loop into array

2010-03-21 Thread perl
I have been trying to make this thing work .. this is not a actual code @s = { some elemnts}; foreach my $s(@s){ # i made that $s into array something like @data1 foreach my$data(@data1) if( $data =~ some text){ #here i will get my data for sure